From 76c3fdfd4925aec057f3087dbdc084015096e496 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 3 Jul 2024 19:07:58 +0200 Subject: [PATCH] Update fnc_detonateAmmunitionServerLoop.sqf --- .../cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf b/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf index a40221a56b..fc517f82ec 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf @@ -107,7 +107,7 @@ if (_removeAmmoDuringCookoff) then { // Virtual magazines case (_magazineInfo isEqualTo true): { // Find the virtual magazines and update its count - private _virtualAmmo = _object getVariable QGVAR(virtualMagazines); + private _virtualAmmo = _object getVariable [QGVAR(virtualMagazines), []]; _magazineIndex = _virtualAmmo findIf {(_x select 0) == _magazineClassname}; if (_magazineIndex == -1) exitWith { @@ -117,7 +117,7 @@ if (_removeAmmoDuringCookoff) then { if (_newAmmoCount <= 0) then { _virtualAmmo deleteAt _magazineIndex; } else { - (_virtualAmmo select _magazineIndex) set [1, _newAmmoCount]; // remove ammo that was detonated + (_virtualAmmo select _magazineIndex) set [1, _newAmmoCount]; // Remove ammo that was detonated }; }; }; @@ -125,7 +125,7 @@ if (_removeAmmoDuringCookoff) then { if (_newAmmoCount <= 0) then { _magazines deleteAt _magazineIndex; } else { - _magazine set [1, _newAmmoCount]; // remove ammo that was detonated + _magazine set [1, _newAmmoCount]; // Remove ammo that was detonated }; };