From 022f9286e2f521cdee796ef02307e4500e842a27 Mon Sep 17 00:00:00 2001 From: ulteq Date: Sat, 13 Jun 2015 19:12:24 +0200 Subject: [PATCH] Fixed a bug in the caching routine --- addons/hearing/functions/fnc_firedNear.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index d935c1f1f2..04c16f99d4 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -48,7 +48,7 @@ if (_silencer != "") then { _audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire"); }; -_weaponMagazines = missionNamespace getVariable [QEGVAR(common,weaponMagazines), []]; +_weaponMagazines = missionNamespace getVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], []]; if (count _weaponMagazines == 0) then { _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles"); _weaponMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); @@ -58,7 +58,7 @@ if (count _weaponMagazines == 0) then { _weaponMagazines append _muzzleMagazines; }; } forEach _muzzles; - missionNamespace setVariable [QEGVAR(common,weaponMagazines), _weaponMagazines]; + missionNamespace setVariable [format[QEGVAR(common,weaponMagazines_%1),_weapon], _weaponMagazines]; }; _magazine = "";