From 26f73e1a984dd081257fb58d086b1cc41e725ff9 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:48:44 +0100 Subject: [PATCH] Update fnc_detonateAmmunition.sqf --- addons/cookoff/functions/fnc_detonateAmmunition.sqf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index 3a66befa5c..cb1d04416f 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -49,6 +49,8 @@ _vehicleAmmo params ["_magazines", "_totalAmmo"]; if (_magazines isEqualTo [] || {_totalAmmo <= 0}) exitWith { [QGVAR(cleanupEffects), _object] call CBA_fnc_globalEvent; + _object setVariable [QGVAR(cookoffMagazines), nil]; + if (_destroyWhenFinished) then { _object setDamage [1, true, _killer, _instigator]; }; @@ -65,6 +67,8 @@ if (underwater _object || { !(GVAR(enableAmmoCookoff) && {_object getVariable [QGVAR(enableAmmoCookoff), true]}) }) exitWith { [QGVAR(cleanupEffects), _object] call CBA_fnc_globalEvent; + + _object setVariable [QGVAR(cookoffMagazines), nil]; }; // Initial delay allows for a delay for the first time this function runs in its cycle