Skip to content

Commit

Permalink
AI Disembark - Do not overwrite "allowCrewInImmobile" (#194)
Browse files Browse the repository at this point in the history
Fixes #175
  • Loading branch information
veteran29 authored Aug 26, 2022
1 parent 664d8c2 commit becfea6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/ai_disembark/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ PREP_RECOMPILE_END;
}] call CBA_fnc_addClassEventHandler;

["LandVehicle", "InitPost", {
(_this select 0) allowCrewInImmobile (random 1 < GVAR(stayInImmobileChance))
params ["_vehicle"];
if (isAllowedCrewInImmobile _vehicle) exitWith {};
private _allow = random 1 < GVAR(stayInImmobileChance);
_vehicle allowCrewInImmobile [_allow, _allow];
}] call CBA_fnc_addClassEventHandler;

ADDON = true;

0 comments on commit becfea6

Please sign in to comment.