94 {
95 Transport trans = Transport.Cast(action_data.m_Target.GetObject());
96 bool accepted = false;
97 int currSeat = trans.CrewMemberIndex(action_data.m_Player);
98 int nextSeat = trans.CrewPositionIndex( action_data.m_Target.GetComponentIndex() );
99 Transport transport = Transport.Cast(action_data.m_Target.GetObject());
100 InventoryLocation il = new InventoryLocation;
101 if (transport)
102 {
103 il.
SetVehicle(transport, action_data.m_Player, nextSeat);
104
105
106 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
107 {
108 accepted = true;
109 action_data.m_ReservedInventoryLocations.Insert(il);
110 }
111
112 if(accepted)
113 {
114 il.
SetVehicle(transport, action_data.m_Player, currSeat);
115
116 if (
GetGame().AddInventoryJunctureEx(action_data.m_Player, action_data.m_Player, il,
true, 10000))
117 {
118 action_data.m_ReservedInventoryLocations.Insert(il);
119 }
120 else
121 {
123 accepted = false;
124 }
125 }
126 }
127
128 return accepted;
129 }
void ClearActionJuncture(ActionData action_data)
proto native void SetVehicle(notnull EntityAI parent, EntityAI e, int idx)
proto native CGame GetGame()