Fix Arma cheats still enterable under certain circumstances

Thanks to Epoch forums user Golgofinyanin for reporting.
https://epochmod.com/forum/profile/13156-golgofinyanin/
This commit is contained in:
ebaydayz
2016-12-03 16:50:55 -05:00
parent 45159d81c2
commit f03f116dfc
4 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
[FIXED] Wrong texture for z_hunter zombie. #1805 @schwanzkopfhegel @ebayShopper
[FIXED] Refuel with generator at gas station not working. #1806 @Helios27 @ebayShopper
[FIXED] Issue where Arma cheats could still be entered under certain conditions without pressing LeftShift at the same time as NumPadMinus. @ebayShopper
[INFO] See Documents\CHANGE LOG 1.0.6.txt for the full list of 1.0.5.1 --> 1.0.6 changes.

View File

@@ -266,7 +266,7 @@ if (isNil "keyboard_keys") then {
[[DIK_Q], {DZE_4 = true;}] call _addArray;
[[DIK_E], {DZE_6 = true;}] call _addArray;
[[DIK_0], _autoRun] call _addArray;
[[DIK_NUMPADMINUS], _filterCheat] call _addArray;
[[DIK_NUMPADMINUS,DIK_LSHIFT], _filterCheat] call _addArray;
[[DIK_SPACE], {DZE_5 = true;}] call _addArray;
[actionKeys "User6", {DZE_F = true;}] call _addArray;
[actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray;

View File

@@ -20,8 +20,11 @@ _inputAction2 = {inputAction _x > 0} count ["NextChannel","PrevChannel"];
_channelChange = _micIcon && ((!isNull findDisplay 24 && _dik in [DIK_DOWN,DIK_UP]) or (_dik in channel_keys) or (_inputAction2 > 0));
_blockVoice = _channelChange or ((_dik in voice_keys or (_inputAction1 > 0)) && (_channel in DZE_DisabledChannels));
if ((_dik == DIK_NUMPADMINUS && _shift) or _blockVoice) then {
if (!_blockVoice) then {call player_forceSave;}; //Perform before disableUserInput to prevent reenable
if (_dik == DIK_NUMPADMINUS) then {dayz_minusDownTime = diag_tickTime;};
_blockCheat = (_dik == DIK_NUMPADMINUS && _shift) or (_dik == DIK_LSHIFT && (diag_tickTime - dayz_minusDownTime < 2));
if (_blockCheat or _blockVoice) then {
if (_blockCheat) then {call player_forceSave;}; //Perform before disableUserInput to prevent reenable
disableUserInput true;disableUserInput true;
if (_blockVoice) then {findDisplay 55 closeDisplay 2;};

View File

@@ -713,4 +713,5 @@ if (!isDedicated) then {
DZE_InRadiationZone = false;
DZE_myVehicle = objNull;
dayz_groupNameTags = true;
dayz_minusDownTime = 0;
};