Fix cheat handling

This adds keydown handler for chat, map, and diary displays.
Additionally, this can be used to handle malicious chat input without a
delay by modifying the associated compile
This commit is contained in:
icomrade
2016-09-02 19:14:21 -04:00
parent 7be75c4674
commit d1d5fe54f3
50 changed files with 72 additions and 63 deletions

View File

@@ -1,5 +1,6 @@
class RscDisplayMainMap
{
onKeyDown = "if (!isNil 'DZE_FilterCheats') then {_this call DZE_FilterCheats;}; false";
class controls
{
delete CA_MainBackground;

View File

@@ -20,6 +20,7 @@ class IGUIBack;
class RscListBox;
class RscIGUIListBox;
class RscHTML;
class RscDisplayEmpty;
#include "CfgPlayerStats\defines.hpp"
#include "CfgPlayerStats\p__cover.hpp"
@@ -31,6 +32,19 @@ class RscHTML;
#include "CfgPlayerStats\p_murders.hpp"
#include "CfgPlayerStats\sound.hpp"
class RscDisplayMission: RscDisplayEmpty
{
access = 0;
idd = 46;
onKeyDown = "if (!isNil 'DZ_KeyDown_EH') then {_this call DZ_KeyDown_EH;};"; //assigned much quicker than executing keyDown.sqf
};
class RscDisplayChat
{
idd = 24;
onKeyDown = "if (!isNil 'DZE_FilterCheats') then {_this call DZE_FilterCheats;}; false";
class controls;
};
class RscPictureGUI
{
access = 0;
@@ -280,6 +294,7 @@ class RscDisplayMain : RscStandardDisplay
class RscDisplayDiary {
idd = 129;
movingEnable = 0;
onKeyDown = "if (!isNil 'DZE_FilterCheats') then {_this call DZE_FilterCheats;}; false";
class Controls {
delete Diary;