mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
optimization waitUntilAndExecute, add comments
This commit is contained in:
parent
4ad16ed938
commit
a2b6166aa0
@ -31,11 +31,12 @@
|
||||
//Handle the waitUntilAndExec array:
|
||||
_deleted = 0;
|
||||
{
|
||||
_x params ["_condition", "_code", "_args"];
|
||||
if ((_args call _condition)) then {
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
// make sure to delete the correct handle when multiple conditions are met in one frame
|
||||
GVAR(waitUntilAndExecArray) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
_args call _code;
|
||||
(_x select 2) call (_x select 1);
|
||||
};
|
||||
} forEach GVAR(waitUntilAndExecArray);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user