mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
weapon magazines caching
This commit is contained in:
parent
d9722db15e
commit
6d4f58c18e
@ -48,15 +48,20 @@ if (_silencer != "") then {
|
|||||||
_audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire");
|
_audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire");
|
||||||
};
|
};
|
||||||
|
|
||||||
_magazine = "";
|
_weaponMagazines = missionNamespace getVariable [QEGVAR(common,weaponMagazines), []];
|
||||||
_muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
|
if (count _weaponMagazines == 0) then {
|
||||||
_weaponMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
|
_muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
|
||||||
{
|
_weaponMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
|
||||||
|
{
|
||||||
if (_x != "this") then {
|
if (_x != "this") then {
|
||||||
_muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
_muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
||||||
_weaponMagazines append _muzzleMagazines;
|
_weaponMagazines append _muzzleMagazines;
|
||||||
};
|
};
|
||||||
} forEach _muzzles;
|
} forEach _muzzles;
|
||||||
|
missionNamespace setVariable [QEGVAR(common,weaponMagazines), _weaponMagazines];
|
||||||
|
};
|
||||||
|
|
||||||
|
_magazine = "";
|
||||||
{
|
{
|
||||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||||
if (_ammoType == _ammo) exitWith {
|
if (_ammoType == _ammo) exitWith {
|
||||||
|
Loading…
Reference in New Issue
Block a user