diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index e9c717504e..aab36121a0 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -56,7 +56,7 @@ class ACE_Triggers { isAttachable = 1; displayName = CSTRING(timerName); picture = QPATHTOF(data\UI\Timer.paa); - onPlace = QUOTE([ARR_2(_this select 1, _this select 3 select 0)] call FUNC(startTimer); false); + onPlace = QUOTE([ARR_4(_this select 1, _this select 3 select 0, nil, _this select 0)] call FUNC(startTimer); false); onSetup = QUOTE(_this call FUNC(openTimerUI)); }; class Tripwire { diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index c7b5848e52..e4292f60b3 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -38,6 +38,6 @@ if (_unit == ace_player) then { playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75]; (_this select 0) setVariable [QGVAR(Dialing), false, true]; }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute; - [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2), "ACE_Cellphone"] call FUNC(startTimer); + [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2), "ACE_Cellphone", _unit] call FUNC(startTimer); }; }; diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf index 484171ec6e..2b0a395b35 100644 --- a/addons/explosives/functions/fnc_startTimer.sqf +++ b/addons/explosives/functions/fnc_startTimer.sqf @@ -7,6 +7,7 @@ * 0: Explosive * 1: Time till detonate * 2: Trigger classname (default: "#timer") + * 3: Unit * * Return Value: * None @@ -17,13 +18,13 @@ * Public: Yes */ -params ["_explosive", "_delay", ["_trigger", "#timer", [""]]]; -TRACE_3("Starting timer",_explosive,_delay,_trigger); +params ["_explosive", "_delay", ["_trigger", "#timer", [""]], ["_unit", objNull, [objNull]]]; +TRACE_4("Starting timer",_explosive,_delay,_trigger,_unit); [{ - params ["_explosive", "_trigger"]; + params ["_explosive", "_trigger", "_unit"]; TRACE_1("Explosive detonating from timer",_explosive); if (!isNull _explosive) then { - [_explosive, -1, [_explosive, 0], _trigger] call FUNC(detonateExplosive); + [_unit, -1, [_explosive, 0], _trigger] call FUNC(detonateExplosive); }; -}, [_explosive, _trigger], _delay] call CBA_fnc_waitAndExecute; +}, [_explosive, _trigger, _unit], _delay] call CBA_fnc_waitAndExecute;