Select 12 actually selects the 13th item in an array, so the rh_factor
line will error if the array is equal to twelve.
This was responsible for some converted characters having a <null> value
in the "rh_factor" slot of their medical array causing them to fail to
save.
Fixed mistake from: e398250
The refuel code was only running if a fuel truck was passed to the
script.
Also removed fuel truck classes that do not exist from the
dze_fueltruckarray.
Filter cheats is now added to the main options menus that needed it.
It is not needed on the map (display 12) because KeyDown for display 46
also fires when it is open. So filterCheats was firing twice (once on
each display) in that case.
KeyDown does not fire on display 63 at all
regardless of whether PTT or VON is held down, toggled or chat open.
Keydown does fire on 55, but only after the mic icon is locked on, so it
is of limited use. MouseButtonDown does not fire on 55 or 63. So it is
useless to add to those displays. You can confirm this with:
(findDisplay 63) displayAddEventHandler ["KeyDown","systemchat
'fired';"];
Filter cheats is now only checked on display 46 when a
voice, channel, or cheat key is pressed instead of on every key press.
This still works 100% of the time for blocking cheat input. For
performance reasons it's probably not worth checking all the conditions
in filterCheats with every key press on display46 just for the VON
block. Doing so covers some edge combination bind cases better, so it
may be worth considering again if no better alternative is found. For
now this solution is good enough to cover the majority of cases without
slowing down the keyhandler during normal usage.
The VON message now
tells you exactly which channel block you triggered instead of listing
all of them.
Fixed issue mentioned in 52c9c7c with VON getting stuck on when using a
double tap keybind.
Tested:
1. Talk in side with regular/combo/mouse bind
2. Change channels
while mic is locked on with regular/combo/mouse bind
3. Change channels
with Up/Down arrows while chat is open.
4. Trying all cases in steps 1-3
with a dialog open.
It is possible to bypass the VON block with some different control
settings and combinations of the above, but for default controls and
common usage it works the majority of the time.
This variable is not useful. If you change it you need to copy all the
AT files to your mission.
It is fewer files in the mission to just overwrite the path in compiles
and fn_selfActions.
Also fixed mistake with not replacing macros in scripts.txt with their
actual values.
Not perfect, occasionally the player can double tap a button to lock VON
on - which now they cannot turn off unless they open the escape menu and
double tap to turn off.
Chat channel changes are now blocked when VON is active.
ActionKeys are now recalculated on key binding change, but it is
important to note that double tap bindings DO NOT work with the
ActionKeys command. This is why inputAction check is neccesary
Summary: Double tapping a key to lock von on (VoiceOverNet) is not
reliably blocked, nor is it blocked at all in secondary
displays/dialogs. otherwise, this works pretty well.