mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
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:
@@ -75,11 +75,11 @@ if (_object isKindOf "Bag_Base_EP1") then {
|
|||||||
} count _normalWeaps;
|
} count _normalWeaps;
|
||||||
|
|
||||||
//transportMaxMagazines is the same as total number of 1x slots in backpack
|
//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);
|
_alreadyInBackpack = (10 * _currentPrim) + (5 * _currentSec) + _currentTool + count(_normalMags);
|
||||||
_totalNewSpace = 10 * _primaryToBuy + 5 * _sidearmToBuy + _toolsToBuy + _toBuyTotalMags;
|
_totalNewSpace = 10 * _primaryToBuy + 5 * _sidearmToBuy + _toolsToBuy + _toBuyTotalMags;
|
||||||
_totalSpace = _alreadyInBackpack + _totalNewSpace;
|
_totalSpace = _alreadyInBackpack + _totalNewSpace;
|
||||||
};
|
};
|
||||||
|
|
||||||
[_totalSpace,_allowedMags,_allowedWeapons,_allowedBackpacks,_totalBagSlots,_normalMags,_normalWeaps,_normalBags]
|
[_totalSpace,_allowedMags,_allowedWeapons,_allowedBackpacks,_totalBagSlots,_normalMags,_normalWeaps,_normalBags]
|
||||||
|
|||||||
Reference in New Issue
Block a user