diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf index 4d711b85..a468f52b 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_CargoFill.sqf @@ -80,10 +80,22 @@ params [["_vehicle",objnull],["_items",[]]]; case 4: { _type = _x select 0; _subContainers = (everycontainer _vehicle) select {(_x select 0) isequalto _type && magazinesAmmoCargo (_x select 1) isequalto [] && weaponsItemsCargo (_x select 1) isequalto []}; - if !(_subContainers isequalto []) - then { + if !(_subContainers isequalto []) then { _subContainer = _subContainers select 0 select 1; [_subContainer,_x select 1] call EPOCH_server_CargoFill; + } + else { + if (_type isKindOf "Bag_Base") then { + _vehicle addBackpackCargoGlobal [_type, 1]; + } + else { + _vehicle addItemCargoGlobal [_type, 1]; + }; + _subContainers = (everycontainer _vehicle) select {(_x select 0) isequalto _type && magazinesAmmoCargo (_x select 1) isequalto [] && weaponsItemsCargo (_x select 1) isequalto []}; + if !(_subContainers isequalto []) then { + _subContainer = _subContainers select 0 select 1; + [_subContainer,_x select 1] call EPOCH_server_CargoFill; + }; }; }; };