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

◆ MoveEntityToFinalPosition()

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

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

207 {
208 if (action_data.m_MainItem.IsBasebuildingKit())
209 return;
210
211 EntityAI entity_for_placing = action_data.m_MainItem;
212 vector rotation_matrix[3];
213 float direction[4];
214 InventoryLocation source = new InventoryLocation;
215 InventoryLocation destination = new InventoryLocation;
216
217 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
218 Math3D.MatrixToQuat(rotation_matrix, direction);
219
220 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
221 {
222 destination.SetGroundEx(entity_for_placing, position, direction);
223
224 if (g_Game.IsMultiplayer())
225 action_data.m_Player.ServerTakeToDst(source, destination);
226 else // singleplayer
227 MoveEntityToFinalPositionSinglePlayer(action_data, source, destination);
228
229 }
230 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942
void MoveEntityToFinalPositionSinglePlayer(ActionData action_data, InventoryLocation source, InventoryLocation destination)
Определения ActionDeployBase.c:232
proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])
sets current inventory location type to Ground with transformation mat

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

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