Include all controls in VON block

Moved to display 46 keydown since keydown on 63 only fires after the VON
transmission has already started (slight delay).

Added mouseButtonDown so it can not be bypassed via assigning a mouse
button.
This commit is contained in:
ebaydayz
2016-11-25 18:22:41 -05:00
parent b6d88b1329
commit b9a5c59660
5 changed files with 29 additions and 24 deletions

View File

@@ -695,20 +695,19 @@ dayz_groupInvite = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups
DZE_FilterCheats = {
#define DIK_NUMPADMINUS 0x4A
#define DIK_CAPSLOCK 0x3A
disableSerialization;
_dik = _this select 1;
_shift = _this select 2;
_isVoiceChat = ((_dik == DIK_CAPSLOCK) && {(ctrlText ((findDisplay 63) displayCtrl 101)) in DZE_LocalizedDisabledChannels}); //getting display directly from _this select 0 isn't reliable for chat channels!
_isVoiceChat = (_dik in dayz_voiceControls && {ctrlText (findDisplay 63 displayCtrl 101) in DZE_DisabledChannels}); //getting display directly from _this select 0 isn't reliable for chat channels!
if ((_dik == DIK_NUMPADMINUS && _shift) || _isVoiceChat) then {
call player_forceSave;
if (!_isVoiceChat) then {call player_forceSave;};
disableUserInput true;disableUserInput true;
[_isVoiceChat] spawn { //disable input, this is unfortunately the only way to stop cheat input
_isVoiceChat spawn { //disable input, this is unfortunately the only way to stop cheat input
_testTime = diag_tickTime;
CheatsDisabled = _testTime;
if (_this select 0) then {
titleText [(Format ["No voice chat in: %1", DZE_LocalizedDisabledChannels]), "PLAIN", 1];
uiSleep 1;
if (_this) then {
titleText [(Format ["No voice chat in: %1", DZE_DisabledChannels]), "PLAIN", 1];
uiSleep 2;
} else {
titleText ["DO NOT ENTER CHEATS, WAIT 5 SECONDS TO CONTINUE!", "PLAIN", 1];
uiSleep 5;
@@ -719,8 +718,7 @@ DZE_FilterCheats = {
};
};
};
_handle = if (_isVoiceChat) then {true;} else {false;};
_handle;
_isVoiceChat
};
player_sumMedical = {

View File

@@ -684,7 +684,9 @@ if (!isDedicated) then {
Dayz_freefall = [ time, 0, 0.1 ];
dayz_getout = objNull;
dayz_getoutTime = 0;
dayz_HitBy = objNull;
dayz_HitBy = objNull;
dayz_voiceControls = [-999];
{dayz_voiceControls = dayz_voiceControls + (actionKeys _x)} count ["VoiceOverNet","PushToTalk","PushToTalkAll","PushToTalkCommand","PushToTalkDirect","PushToTalkGroup","PushToTalkSide","PushToTalkVehicle"];
// EPOCH ADDITIONS
if (isNil "DZE_BackpackAntiTheft") then {DZE_BackpackAntiTheft = false;};