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
228
229 }
230 }
void MoveEntityToFinalPositionSinglePlayer(ActionData action_data, InventoryLocation source, InventoryLocation destination)
proto native void SetGroundEx(EntityAI e, vector pos, float dir[4])
sets current inventory location type to Ground with transformation mat