From 38baa8dc6cb4ab00818100b5e7e0320db47654ca Mon Sep 17 00:00:00 2001 From: Cyruz143 Date: Thu, 3 Sep 2020 16:56:49 +0100 Subject: [PATCH] Check if vehicle has simEnabled before mounting (#7886) --- addons/quickmount/functions/fnc_canShowFreeSeats.sqf | 1 + addons/quickmount/functions/fnc_getInNearest.sqf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf index ac146a8c57..506dbd78ac 100644 --- a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf +++ b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf @@ -30,6 +30,7 @@ GVAR(enabled) } && {alive _vehicle} && {2 > locked _vehicle} +&& {simulationEnabled _vehicle} && { -1 == crew _vehicle findIf {alive _x} || {0.6 <= side group _unit getFriend side group _vehicle} diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index b94ba8f0d9..7b1ac71868 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -37,7 +37,7 @@ if ((isNull _target) && {alive _interactionTarget}) then { _target = (_objects param [0, []]) param [2, objNull]; }; -if (locked _target in [2,3]) exitWith { +if (locked _target in [2,3] || {!simulationEnabled _target}) exitWith { [localize LSTRING(VehicleLocked)] call EFUNC(common,displayTextStructured); true };