mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
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:
@@ -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;
|
||||
|
||||
@@ -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;};
|
||||
|
||||
|
||||
@@ -713,4 +713,5 @@ if (!isDedicated) then {
|
||||
DZE_InRadiationZone = false;
|
||||
DZE_myVehicle = objNull;
|
||||
dayz_groupNameTags = true;
|
||||
dayz_minusDownTime = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user