Check if vehicle has simEnabled before mounting (#7886)

This commit is contained in:
Cyruz143 2020-09-03 16:56:49 +01:00 committed by GitHub
parent 6140a94efe
commit 38baa8dc6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ GVAR(enabled)
} }
&& {alive _vehicle} && {alive _vehicle}
&& {2 > locked _vehicle} && {2 > locked _vehicle}
&& {simulationEnabled _vehicle}
&& { && {
-1 == crew _vehicle findIf {alive _x} -1 == crew _vehicle findIf {alive _x}
|| {0.6 <= side group _unit getFriend side group _vehicle} || {0.6 <= side group _unit getFriend side group _vehicle}

View File

@ -37,7 +37,7 @@ if ((isNull _target) && {alive _interactionTarget}) then {
_target = (_objects param [0, []]) param [2, objNull]; _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); [localize LSTRING(VehicleLocked)] call EFUNC(common,displayTextStructured);
true true
}; };