local-private waitAndXX PFEH

This commit is contained in:
PabstMirror 2015-10-04 11:38:31 -05:00
parent f3e61e2136
commit 616bc9f8a0

View File

@ -9,11 +9,11 @@
//Singe PFEH to handle execNextFrame, waitAndExec and waitUntilAndExec:
[{
private ["_entry", "_deleted"];
BEGIN_COUNTER(waitAndExec);
//Handle the waitAndExec array:
while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do {
_entry = GVAR(waitAndExecArray) deleteAt 0;
local _entry = GVAR(waitAndExecArray) deleteAt 0;
(_entry select 2) call (_entry select 1);
};
@ -29,7 +29,7 @@
GVAR(nextFrameNo) = diag_frameno + 1;
//Handle the waitUntilAndExec array:
_deleted = 0;
local _deleted = 0;
{
// if condition is satisifed call statement
if ((_x select 2) call (_x select 0)) then {
@ -39,6 +39,8 @@
(_x select 2) call (_x select 1);
};
} forEach GVAR(waitUntilAndExecArray);
END_COUNTER(waitAndExec);
}, 0, []] call CBA_fnc_addPerFrameHandler;