mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Explosives - Fix objNull
reported as source and instigator in BI handleDamage
event for explosive triggered by timer (#8647)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
715da4d1bd
commit
c83caa63b4
@ -56,7 +56,7 @@ class ACE_Triggers {
|
|||||||
isAttachable = 1;
|
isAttachable = 1;
|
||||||
displayName = CSTRING(timerName);
|
displayName = CSTRING(timerName);
|
||||||
picture = QPATHTOF(data\UI\Timer.paa);
|
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));
|
onSetup = QUOTE(_this call FUNC(openTimerUI));
|
||||||
};
|
};
|
||||||
class Tripwire {
|
class Tripwire {
|
||||||
|
@ -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];
|
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];
|
(_this select 0) setVariable [QGVAR(Dialing), false, true];
|
||||||
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute;
|
}, [_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);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
* 0: Explosive <OBJECT>
|
* 0: Explosive <OBJECT>
|
||||||
* 1: Time till detonate <NUMBER>
|
* 1: Time till detonate <NUMBER>
|
||||||
* 2: Trigger classname <STRING> (default: "#timer")
|
* 2: Trigger classname <STRING> (default: "#timer")
|
||||||
|
* 3: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -17,13 +18,13 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_explosive", "_delay", ["_trigger", "#timer", [""]]];
|
params ["_explosive", "_delay", ["_trigger", "#timer", [""]], ["_unit", objNull, [objNull]]];
|
||||||
TRACE_3("Starting timer",_explosive,_delay,_trigger);
|
TRACE_4("Starting timer",_explosive,_delay,_trigger,_unit);
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_explosive", "_trigger"];
|
params ["_explosive", "_trigger", "_unit"];
|
||||||
TRACE_1("Explosive detonating from timer",_explosive);
|
TRACE_1("Explosive detonating from timer",_explosive);
|
||||||
if (!isNull _explosive) then {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user