mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Safe/Load all Vehicle Magazines correctly
This commit is contained in:
parent
532df074f2
commit
4b88db0279
@ -225,9 +225,23 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
} forEach _objTypes;
|
} forEach _objTypes;
|
||||||
} forEach (_arr select 5);
|
} forEach (_arr select 5);
|
||||||
|
|
||||||
// remove and add back magazines works for armed trucks but not helis ATM
|
// remove and add back magazines
|
||||||
{_vehicle removeMagazineGlobal _x}count (magazines _vehicle);
|
if !((_arr select 6) isequalto []) then {
|
||||||
{_vehicle addMagazine _x}count (_arr select 6);
|
if ((_arr select 6 select 0) isequaltype true) then {
|
||||||
|
{
|
||||||
|
_vehicle removeMagazinesTurret [_x select 0, _x select 1];
|
||||||
|
} foreach magazinesAllTurrets _vehicle;
|
||||||
|
{
|
||||||
|
if ((_x select 2) > 0) then {
|
||||||
|
_vehicle addMagazineTurret [_x select 0,_x select 1,_x select 2];
|
||||||
|
};
|
||||||
|
} foreach (_arr select 6 select 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
{_vehicle removeMagazineGlobal _x}count (magazines _vehicle);
|
||||||
|
{_vehicle addMagazine _x}count (_arr select 6);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// turrets
|
// turrets
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user