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
172 action_data.m_Player.ServerTakeToDst(source, destination);
173 else
175
176 }
177 }
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
proto native CGame GetGame()