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

◆ MoveEntityToFinalPosition()

void ActionDeployBase::MoveEntityToFinalPosition ( ActionData action_data,
vector position,
vector orientation )
inlineprotected

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

174 {
175 if (action_data.m_MainItem.IsBasebuildingKit())
176 return;
177
178 EntityAI entity_for_placing = action_data.m_MainItem;
179 vector rotation_matrix[3];
180 float direction[4];
181 InventoryLocation source = new InventoryLocation;
182 InventoryLocation destination = new InventoryLocation;
183
184 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
185 Math3D.MatrixToQuat(rotation_matrix, direction);
186
187 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
188 {
189 destination.SetGroundEx(entity_for_placing, position, direction);
190
191 if (GetGame().IsMultiplayer())
192 action_data.m_Player.ServerTakeToDst(source, destination);
193 else // singleplayer
194 MoveEntityToFinalPositionSinglePlayer(action_data, source, destination);
195
196 }
197 }
class LogManager EntityAI
void MoveEntityToFinalPositionSinglePlayer(ActionData action_data, InventoryLocation source, InventoryLocation destination)
Определения ActionDeployBase.c:199
proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])
sets current inventory location type to Ground with transformation mat
proto native CGame GetGame()

Перекрестные ссылки ActionData, GetGame(), Math3D::MatrixToQuat(), MoveEntityToFinalPositionSinglePlayer(), InventoryLocation::SetGroundEx() и Math3D::YawPitchRollMatrix().

Используется в OnFinishProgressServer().