Allow defusing naval mines

Fix #4074
- Workaround for naval mines not working with deactivate
- Add "isNotSwimming" exception to defuse progress bar
This commit is contained in:
PabstMirror 2016-07-10 13:49:06 -05:00
parent d249132864
commit 721bc205ef
2 changed files with 9 additions and 2 deletions

View File

@ -25,5 +25,12 @@ if (GVAR(ExplodeOnDefuse) && {(random 1.0) < (getNumber (ConfigFile >> "CfgAmmo"
[QGVAR(explodeOnDefuse), [_explosive, _unit]] call CBA_fnc_globalEvent;
};
_unit action ["Deactivate", _unit, _explosive];
[QGVAR(defuse), [_explosive, _unit]] call CBA_fnc_globalEvent;
if (!(_explosive isKindOf "UnderwaterMine_Range_Ammo")) then {
_unit action ["Deactivate", _unit, _explosive];
} else {
// Underwater naval mines don't seem to respond to the deactivate action
// For now, lets just delete them
deleteVehicle _explosive;
};

View File

@ -63,6 +63,6 @@ if (ACE_player != _unit) then {
_isEOD = [_unit] call EFUNC(Common,isEOD);
_defuseTime = [_isEOD, _target] call _fnc_DefuseTime;
if (_isEOD || {!GVAR(RequireSpecialist)}) then {
[_defuseTime, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize LSTRING(DefusingExplosive))] call EFUNC(common,progressBar);
[_defuseTime, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize LSTRING(DefusingExplosive)), {true}, ["isNotSwimming"]] call EFUNC(common,progressBar);
};
};