From 977bda83e5c9464a26bfdb29f1e6c84768c6f1f0 Mon Sep 17 00:00:00 2001 From: bux Date: Fri, 1 Jan 2016 21:47:39 +0100 Subject: [PATCH] add 2 new events, add unit to place event defuse and explodeOnDefuse --- addons/explosives/functions/fnc_defuseExplosive.sqf | 2 ++ addons/explosives/functions/fnc_placeExplosive.sqf | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index 0af28788b3..d8a52df9ee 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -22,6 +22,8 @@ TRACE_2("params",_unit,_explosive); if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo" >> typeOf _explosive >> "ACE_explodeOnDefuse"))}) exitWith { TRACE_1("exploding on defuse",_explosive); [_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive); + [QGVAR(explodeOnDefuse), [_explosive, _unit]] call EFUNC(common,globalEvent); }; _unit action ["Deactivate", _unit, _explosive]; +[QGVAR(defuse), [_explosive, _unit]] call EFUNC(common,globalEvent); diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index e1cdbcd80c..83cdb2fef8 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -94,7 +94,7 @@ if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_tr _pitch = getNumber (_magazineTrigger >> "pitch"); -//Globaly set the position angle: -[QGVAR(place), [_explosive, _dir, _pitch]] call EFUNC(common,globalEvent); +//Globaly set the position and angle: +[QGVAR(place), [_explosive, _dir, _pitch, _unit]] call EFUNC(common,globalEvent); _explosive