From ebcaef203dbc320819e99bff888b8b07f73d56c4 Mon Sep 17 00:00:00 2001 From: Cyruz143 Date: Mon, 31 Aug 2020 00:34:05 +0100 Subject: [PATCH] Check if vehicle has simEnabled before mounting --- 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 ac146a8c578..506dbd78aca 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 b94ba8f0d9a..7b1ac718687 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 };