mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Small fix for 3rd part scripts that use CargoSave on destroyed Vehicles
This commit is contained in:
parent
d277d6cd57
commit
297b2c0473
@ -80,10 +80,22 @@ params [["_vehicle",objnull],["_items",[]]];
|
|||||||
case 4: {
|
case 4: {
|
||||||
_type = _x select 0;
|
_type = _x select 0;
|
||||||
_subContainers = (everycontainer _vehicle) select {(_x select 0) isequalto _type && magazinesAmmoCargo (_x select 1) isequalto [] && weaponsItemsCargo (_x select 1) isequalto []};
|
_subContainers = (everycontainer _vehicle) select {(_x select 0) isequalto _type && magazinesAmmoCargo (_x select 1) isequalto [] && weaponsItemsCargo (_x select 1) isequalto []};
|
||||||
if !(_subContainers isequalto [])
|
if !(_subContainers isequalto []) then {
|
||||||
then {
|
|
||||||
_subContainer = _subContainers select 0 select 1;
|
_subContainer = _subContainers select 0 select 1;
|
||||||
[_subContainer,_x select 1] call EPOCH_server_CargoFill;
|
[_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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user