Properly disable antiTP and sched security when dayz_antihack=0;

This prevents them being called unnecessarily on loop.
This commit is contained in:
ebaydayz
2017-01-25 15:02:05 -05:00
parent 7d6319fa30
commit c641bc20a8
4 changed files with 18 additions and 14 deletions

View File

@@ -1,15 +1,13 @@
// (c) facoptere@gmail.com, licensed to DayZMod for the community
sched_security_init = {
if (dayz_antihack == 1) then { diag_log [ diag_ticktime, __FILE__, "Some security routines inited"]; };
if (dayz_antihack == 1) then { [ "", time, 0, 0, grpNull ] } else { [] }
diag_log [ diag_ticktime, __FILE__, "Some security routines inited"];
[ "", time, 0, 0, grpNull ]
};
sched_security = {
private ["_netid","_timeTrickCount","_idTrickCount","_time","_otime","_pid", "_quit", "_list"];
if (count _this != 5) exitWith { [] };
_netid = _this select 0;
_otime = _this select 1;
_idTrickCount = _this select 2;
@@ -50,7 +48,7 @@ sched_security = {
};
};
if (isNull _grp) then { _grp = group ((allmissionobjects 'FunctionsManager') select 0); };
if (isNull _grp) then { _grp = group ((entities 'FunctionsManager') select 0); };
if (!isNull _grp) then {
_list = units _grp;
if (count _list > 1) then {