Captives - Load into back seats first (#8973)

Reverses the list of seats for loading captives
This commit is contained in:
Kam 2022-08-16 16:33:15 +02:00 committed by GitHub
parent 4943b2119d
commit 131b0b9472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,18 +20,21 @@ TRACE_1("params", _vehicle);
scopeName "main"; scopeName "main";
private _seats = fullCrew [_vehicle, "", true];
reverse _seats;
{ {
_x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"];
if (isNull _unit && {_role == "cargo"} && {_cargoIndex > -1} && {!_isPersonTurret}) then { if (isNull _unit && {_role == "cargo"} && {_cargoIndex > -1} && {!_isPersonTurret}) then {
[_cargoIndex, false] breakOut "main"; [_cargoIndex, false] breakOut "main";
}; };
} forEach (fullCrew [_vehicle, "", true]); } forEach _seats;
{ {
_x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"];
if (isNull _unit && {_cargoIndex > -1}) then { if (isNull _unit && {_cargoIndex > -1}) then {
[_cargoIndex, true] breakOut "main"; [_cargoIndex, true] breakOut "main";
}; };
} forEach (fullCrew [_vehicle, "", true]); } forEach _seats;
[-1, false] [-1, false]