13 override void CreateConditionComponents()
25 HumanCommandVehicle vehCommand = player.GetCommand_Vehicle();
30 int componentIndex = target.GetComponentIndex();
35 if ( !
Class.CastTo(trans, target.GetObject()) )
38 nextSeatIdx = trans.CrewPositionIndex( componentIndex );
40 if ( nextSeatIdx < 0 )
43 Human crew = trans.CrewMember( nextSeatIdx );
47 if ( !trans.CanReachSeatFromSeat( trans.CrewMemberIndex( player ), nextSeatIdx ) )
53 override void OnStart(ActionData action_data)
55 super.OnStart(action_data);
56 HumanCommandVehicle vehCommand = action_data.m_Player.GetCommand_Vehicle();
60 if (
Class.CastTo(trans, action_data.m_Target.GetObject()) )
62 int nextSeat = trans.CrewPositionIndex( action_data.m_Target.GetComponentIndex() );
63 int seat = trans.GetSeatAnimationType( nextSeat );
67 vehCommand.SwitchSeat( nextSeat, seat );
69 action_data.m_Player.OnVehicleSwitchSeat( nextSeat );
75 override void OnUpdate(ActionData action_data)
80 HumanCommandVehicle hcv = action_data.m_Player.GetCommand_Vehicle();
81 if( !hcv || !action_data.m_Player.GetCommand_Vehicle().IsSwitchSeat() )
88 override bool CanBeUsedInVehicle()
93 override bool AddActionJuncture(ActionData action_data)
96 bool accepted =
false;
97 int currSeat = trans.CrewMemberIndex(action_data.m_Player);
98 int nextSeat = trans.CrewPositionIndex( action_data.m_Target.GetComponentIndex() );
103 il.SetVehicle(transport, action_data.m_Player, nextSeat);
106 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
109 action_data.m_ReservedInventoryLocations.Insert(il);
114 il.SetVehicle(transport, action_data.m_Player, currSeat);
116 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
118 action_data.m_ReservedInventoryLocations.Insert(il);