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

◆ MoveEntityToFinalPosition()

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

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

154 {
155 if (action_data.m_MainItem.IsBasebuildingKit())
156 return;
157
158 EntityAI entity_for_placing = action_data.m_MainItem;
159 vector rotation_matrix[3];
160 float direction[4];
161 InventoryLocation source = new InventoryLocation;
162 InventoryLocation destination = new InventoryLocation;
163
164 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
165 Math3D.MatrixToQuat(rotation_matrix, direction);
166
167 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
168 {
169 destination.SetGroundEx(entity_for_placing, position, direction);
170
171 if (GetGame().IsMultiplayer())
172 action_data.m_Player.ServerTakeToDst(source, destination);
173 else // singleplayer
174 MoveEntityToFinalPositionSinglePlayer(action_data, source, destination);
175
176 }
177 }
class LogManager EntityAI
void MoveEntityToFinalPositionSinglePlayer(ActionData action_data, InventoryLocation source, InventoryLocation destination)
Определения ActionDeployBase.c:179
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().