CSW - Force QGVAR(handleExtraMagazinesType) to be respected (#9903)

Force QGVAR(handleExtraMagazinesType) to be respected
This commit is contained in:
johnb432 2024-05-23 21:56:28 +02:00 committed by GitHub
parent c0d74ba703
commit c634bbe1ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,7 +41,7 @@ if ((_fullMagazines == 0) && {_bulletsRemaining == 0}) exitWith {};
private _container = _unloadTo getVariable [QGVAR(container), objNull];
if ((_container distance _unloadTo) > 10) then { _container = objNull; };
if (isNull _container) then {
_container = (nearestObjects [_unloadTo, [QGVAR(ammo_holder), "GroundWeaponHolder"], 10]) param [0, objNull];
_container = (nearestObjects [_unloadTo, [["GroundWeaponHolder"], [QGVAR(ammo_holder)]] select GVAR(handleExtraMagazinesType), 10]) param [0, objNull];
};