DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ AddActionJuncture()

override bool ActionSwitchSeats::AddActionJuncture ( ActionData action_data)
inlineprivate

См. определение в файле ActionSwitchSeats.c строка 93

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 //Lock target
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 {
122 ClearActionJuncture(action_data);
123 accepted = false;
124 }
125 }
126 }
127
128 return accepted;
129 }
void ClearActionJuncture(ActionData action_data)
Определения ActionBase.c:1083
proto native void SetVehicle(notnull EntityAI parent, EntityAI e, int idx)
proto native CGame GetGame()

Перекрестные ссылки ActionData, ActionBase::ClearActionJuncture(), GetGame() и InventoryLocation::SetVehicle().