Replaced sleep with waitAndExecute

This commit is contained in:
ulteq 2015-05-01 10:12:41 +02:00
parent b4c057919e
commit e8264110bb

View File

@ -43,15 +43,15 @@ if (ACE_player != _unit) then {
if (isPlayer _unit) then {
[[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc);
} else {
// TODO: use scheduled delay execution
[_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn {
(_this select 0) playActionNow _actionToPlay;
(_this select 0) disableAI "MOVE";
(_this select 0) disableAI "TARGET";
sleep (_this select 2);
[(_this select 0), (_this select 1)] call FUNC(defuseExplosive);
(_this select 0) enableAI "MOVE";
(_this select 0) enableAI "TARGET";
[{
[(_this select 0), (_this select 1)] call FUNC(defuseExplosive);
(_this select 0) enableAI "MOVE";
(_this select 0) enableAI "TARGET";
}, _this, (_this select 2), 0] call EFUNC(common,waitAndExecute);
};
};
} else {