-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy paths_genThreadCheckerIndependent.sqf
More file actions
69 lines (68 loc) · 2.81 KB
/
s_genThreadCheckerIndependent.sqf
File metadata and controls
69 lines (68 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*──────────────────────────────────────────────────────┐
│ Author: Connor │
│ Steam: https://steamcommunity.com/id/_connor │
│ Github: https://github.com/ConnorAU │
│ │
│ Please do not modify or remove this comment block │
└──────────────────────────────────────────────────────*/
private _genThreadCheckerIndependent = {
params ['_threadType','_reasonVar','_objID','_threadVar','_hijackVar','_hijackValueMax','_acInitFailedVar'];
"
if (isNil '"+_clientExecutionExecuted+"') exitwith {"+_clientExecutionExecuted+" = diag_tickTime;};
_"+_reasonVar+" = [];
"+([1] call _checkFlaggedStatus)+"
if ("+_clientExecutionExecuted+" isequaltype 0) exitwith {
private _e = diag_tickTime - "+_clientExecutionExecuted+";
if (_e >= 60) then {
_info = [_e,getposatl player,diag_fps,[
!isNull(findDisplay 46),
missionNameSpace getvariable ['CAU_mission_functions_ready',false]
],missionNameSpace getVariable ['CAU_setup_loadingScreenData',[1]]];
_"+_reasonVar+" = ['tc05k',_info];
if (isNil '"+_acInitFailedVar+"' && ((_info select 2) < 10 OR (_info select 3 select 0))) then {
_"+_reasonVar+" set [0,'tc05'];
"+_acInitFailedVar+" = true;
};
call _"+_checkFlaggedStatusVar+";
};
};
disableSerialization;
if (!isNil "+str _threadVar+" && {"+_threadVar+" isEqualType scriptNull}) then {
if (isNull "+_threadVar+") then {
_"+_reasonVar+" = ['tc01','"+_threadType+"'];
} else {
if !(['Unsuspicious Thread Name',str "+_threadVar+"] call BIS_fnc_inString) then {
_"+_reasonVar+" = ['tc04',['"+_threadType+"',"+_threadVar+"]];
};
};
} else {
private _o = objectFromNetId "+str _objID+";
private _s = _o getVariable ["+str _threadVar+",scriptNull];
if (isNull _s) then {
_"+_reasonVar+" = ['tc01','"+_threadType+"'];
} else {
"+_threadVar+" = _s;
if !(['Unsuspicious Thread Name',str "+_threadVar+"] call BIS_fnc_inString) then {
_"+_reasonVar+" = ['tc04',['"+_threadType+"',"+_threadVar+"]];
};
};
};
call _"+_checkFlaggedStatusVar+";
if (isNil "+(str _hijackVar)+") then {
_"+_reasonVar+" = ['tc02','"+_threadType+"'];
"+_hijackVar+" = 1;
} else {
if ("+_hijackVar+" >= "+(str _hijackValueMax)+") then {
_"+_reasonVar+" = ['tc03',['"+_threadType+"',"+_hijackVar+",round diag_fps,getpos player]];
if ("+_hijackVar+" == "+(str _hijackValueMax)+") then {
_"+_reasonVar+" set [0,'tc03d'];
};
if (diag_fps > 10 && "+_hijackVar+" >= 12) then {
_"+_reasonVar+" set [0,'tc03b'];
};
};
"+_hijackVar+" = "+_hijackVar+" + 1;
};
call _"+_checkFlaggedStatusVar+";
";
};