7 SCR_EditableCharacterComponent character = SCR_EditableCharacterComponent.Cast(selectedEntity);
8 if (character && character.GetPlayerID() <= 0)
10 return character.GetVehicle();
24 BaseCompartmentManagerComponent compartmentManager = BaseCompartmentManagerComponent.Cast(owner.FindComponent(BaseCompartmentManagerComponent));
25 if (compartmentManager)
31 return IsCharacterInVehicle(selectedEntity);
44 BaseCompartmentManagerComponent compartmentManager = BaseCompartmentManagerComponent.Cast(owner.FindComponent(BaseCompartmentManagerComponent));
45 if (compartmentManager)
47 array<CompartmentAccessComponent> crewCompartmentAccess =
new array<CompartmentAccessComponent>;
48 selectedEntity.GetCrew(crewCompartmentAccess);
50 return !crewCompartmentAccess.IsEmpty();
54 return IsCharacterInVehicle(selectedEntity);
63 array<CompartmentAccessComponent> crewCompartmentAccess =
new array<CompartmentAccessComponent>;
64 SCR_EditableCharacterComponent character = SCR_EditableCharacterComponent.Cast(selectedEntity);
68 if (character && character.GetPlayerID() <= 0)
70 selectedEntity.GetCrew(crewCompartmentAccess,
false);
73 character.RemoveUsableVehicle(character.GetVehicle().GetOwner());
76 foreach (CompartmentAccessComponent compartmentAccess: crewCompartmentAccess)
78 if (compartmentAccess.CanGetOutVehicleViaDoor(-1))
79 compartmentAccess.GetOutVehicle(-1,
false);
86 SCR_EditableVehicleComponent vehicle = SCR_EditableVehicleComponent.Cast(selectedEntity);
89 selectedEntity.GetCrew(crewCompartmentAccess,
false);
90 foreach (CompartmentAccessComponent compartmentAccess: crewCompartmentAccess)
92 character = SCR_EditableCharacterComponent.Cast(compartmentAccess.GetOwner().FindComponent(SCR_EditableCharacterComponent));
95 if (!character || character.GetPlayerID() > 0)
99 character.RemoveUsableVehicle(vehicle.GetOwner(),
false);
101 if (compartmentAccess.CanGetOutVehicleViaDoor(-1))
102 compartmentAccess.GetOutVehicle(-1,
false);