diff --git a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf index 7c9daf1080..5ed3cb5871 100644 --- a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf +++ b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf @@ -20,18 +20,21 @@ TRACE_1("params", _vehicle); scopeName "main"; +private _seats = fullCrew [_vehicle, "", true]; +reverse _seats; + { _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; if (isNull _unit && {_role == "cargo"} && {_cargoIndex > -1} && {!_isPersonTurret}) then { [_cargoIndex, false] breakOut "main"; }; -} forEach (fullCrew [_vehicle, "", true]); +} forEach _seats; { _x params ["_unit", "_role", "_cargoIndex", "_turretPath", "_isPersonTurret"]; if (isNull _unit && {_cargoIndex > -1}) then { [_cargoIndex, true] breakOut "main"; }; -} forEach (fullCrew [_vehicle, "", true]); +} forEach _seats; [-1, false]