Disable shift + - input

shift + - is used to ented arma "chests" which allow the player to issue
endMission, and limit their fps (min 5 fps limit). This unfortunately
disables the flush cheat, but attempts to filter out input and allow
flush are not reliable.
This commit is contained in:
icomrade
2016-08-29 13:49:05 -04:00
parent 78d17a5f87
commit 92b4c8785d

View File

@@ -360,6 +360,17 @@ if (isNil "keyboard_keys") then {
//diag_log [diag_ticktime, __FILE__, "eh reset" ]; //diag_log [diag_ticktime, __FILE__, "eh reset" ];
}; };
if (_dikCode == DIK_NUMPADMINUS && _shiftState) then {
call player_forceSave;
disableUserInput true;disableUserInput true;
[] spawn { //disable input, this is unfortunately the only way to stop cheat input
titleText ["DO NOT ENTER CHEATS, WAIT 5 SECONDS TO CONTINUE!", "plain", 1];
uisleep 5;
if (!r_player_unconsciousInputDisabled) then {
disableUserInput false;disableUserInput true;disableUserInput false;disableUserInput false; //weird disableuserInput behavior, enable input, disable and reenable to prevent the last key press being input after re-enable
};
};
};
if (r_player_unconsciousInputDisabled) exitWith {true}; if (r_player_unconsciousInputDisabled) exitWith {true};
_code = keyboard_keys select _dikCode; _code = keyboard_keys select _dikCode;
if (!isNil "_code") then { if (!isNil "_code") then {