mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup++:
*Removed spawn *Added, moved and renamed some privates
This commit is contained in:
@ -17,7 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
EXPLODE_2_PVT(_this,_unit,_target);
|
EXPLODE_2_PVT(_this,_unit,_target);
|
||||||
|
|
||||||
private["_actionToPlay"];
|
private["_actionToPlay", "_defuseTime", "_isEOD"];
|
||||||
|
|
||||||
_target = attachedTo (_target);
|
_target = attachedTo (_target);
|
||||||
|
|
||||||
@ -43,23 +43,23 @@ if (ACE_player != _unit) then {
|
|||||||
if (isPlayer _unit) then {
|
if (isPlayer _unit) then {
|
||||||
[[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc);
|
[[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc);
|
||||||
} else {
|
} else {
|
||||||
[_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn {
|
//[_unit, _target, [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime] spawn {
|
||||||
(_this select 0) playActionNow _actionToPlay;
|
_unit playActionNow _actionToPlay;
|
||||||
(_this select 0) disableAI "MOVE";
|
_unit disableAI "MOVE";
|
||||||
(_this select 0) disableAI "TARGET";
|
_unit disableAI "TARGET";
|
||||||
|
_defuseTime = [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime;
|
||||||
[{
|
[{
|
||||||
[(_this select 0), (_this select 1)] call FUNC(defuseExplosive);
|
PARAMS_2(_unit,_target);
|
||||||
(_this select 0) enableAI "MOVE";
|
[_unit, _target] call FUNC(defuseExplosive);
|
||||||
(_this select 0) enableAI "TARGET";
|
_unit enableAI "MOVE";
|
||||||
}, _this, (_this select 2), 0] call EFUNC(common,waitAndExecute);
|
_unit enableAI "TARGET";
|
||||||
};
|
}, [_unit, _target], _defuseTime, 0] call EFUNC(common,waitAndExecute);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_unit playActionNow _actionToPlay;
|
_unit playActionNow _actionToPlay;
|
||||||
private ["_defuseSeconds", "_isEOD"];
|
|
||||||
_isEOD = [_unit] call EFUNC(Common,isEOD);
|
_isEOD = [_unit] call EFUNC(Common,isEOD);
|
||||||
_defuseSeconds = [_isEOD, _target] call _fnc_DefuseTime;
|
_defuseTime = [_isEOD, _target] call _fnc_DefuseTime;
|
||||||
if (_isEOD || {!GVAR(RequireSpecialist)}) then {
|
if (_isEOD || {!GVAR(RequireSpecialist)}) then {
|
||||||
[_defuseSeconds, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize "STR_ACE_Explosives_DefusingExplosive")] call EFUNC(common,progressBar);
|
[_defuseTime, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize "STR_ACE_Explosives_DefusingExplosive")] call EFUNC(common,progressBar);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user