diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index d3631fdb5f..3d5a620ed2 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -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 {