Made use of time instead of diag_ticktime, to take care of time acceleration and so forth.

This commit is contained in:
Garth L-H de Wet 2015-02-03 11:50:11 +02:00
parent 9e1cd9a194
commit c08494cc43

View File

@ -19,8 +19,8 @@ _unit = _this select 0;
GVAR(PFH) = false;
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
[{
if (diag_tickTime >= ((_this select 0) select 0) + 1) then {
if (time >= ((_this select 0) select 0) + 1) then {
((_this select 0) select 1) playActionNow "Crouch";
[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);
};
}, 1, [diag_tickTime,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler);
}, 1, [time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler);