From 131b0b9472931e6bc857f2f0b92e21f2656c8c9d Mon Sep 17 00:00:00 2001 From: Kam Date: Tue, 16 Aug 2022 16:33:15 +0200 Subject: [PATCH] Captives - Load into back seats first (#8973) Reverses the list of seats for loading captives --- addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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]