Skip to content

Commit fc3f318

Browse files
authored
AI Disembark - Add locality check for allowCrewInImmobile (#236)
The command has global effect and should be executed where vehicle is local
1 parent 31758ab commit fc3f318

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

addons/ai_disembark/XEH_preInit.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PREP_RECOMPILE_END;
1313

1414
["LandVehicle", "InitPost", {
1515
params ["_vehicle"];
16-
if (isAllowedCrewInImmobile _vehicle) exitWith {};
16+
if (isAllowedCrewInImmobile _vehicle || !local _vehicle) exitWith {};
1717
private _allow = random 1 < GVAR(stayInImmobileChance);
1818
_vehicle allowCrewInImmobile [_allow, _allow];
1919
}] call CBA_fnc_addClassEventHandler;

0 commit comments

Comments
 (0)