2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Causes the unit to defuse the passed explosive.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Explosive <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player, ACE_Interaction_Target] call ACE_Explosives_fnc_defuseExplosive;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit", "_explosive"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
_explosive = _this select 1;
|
|
|
|
|
2015-01-12 09:48:26 +00:00
|
|
|
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
|
|
|
|
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_unit action ["Deactivate", _unit, _explosive];
|