Fix wrong variable name in z_at_calcFreeSpace

I didn't catch this mistake before because _backpack was not in the private array, so it was still defined from the script that called this function. Thanks @oiad
This commit is contained in:
ebaydayz
2016-10-18 15:56:45 -04:00
committed by GitHub
parent fffcf43bbb
commit 869e95eb2c

View File

@@ -75,7 +75,7 @@ if (_object isKindOf "Bag_Base_EP1") then {
} count _normalWeaps;
//transportMaxMagazines is the same as total number of 1x slots in backpack
_totalBagSlots = getNumber (configFile >> "CfgVehicles" >> (typeOf _backpack) >> "transportMaxMagazines");
_totalBagSlots = getNumber (configFile >> "CfgVehicles" >> (typeOf _object) >> "transportMaxMagazines");
_alreadyInBackpack = (10 * _currentPrim) + (5 * _currentSec) + _currentTool + count(_normalMags);
_totalNewSpace = 10 * _primaryToBuy + 5 * _sidearmToBuy + _toolsToBuy + _toBuyTotalMags;