76 if (!poActionData.m_MainItem)
81 EntityAI entity_for_placing = poActionData.m_MainItem;
88 if (poActionData.m_Player.GetHologramServer())
90 position = poActionData.m_Position;
91 orientation = poActionData.m_Orientation;
93 poActionData.m_Player.GetHologramServer().EvaluateCollision(poActionData.m_MainItem);
94 if (
g_Game.IsMultiplayer() && poActionData.m_Player.GetHologramServer().IsColliding())
97 poActionData.m_Player.GetHologramServer().PlaceEntity(entity_for_placing);
99 if (
g_Game.IsMultiplayer())
100 poActionData.m_Player.GetHologramServer().CheckPowerSource();
105 Debug.Log(
string.Format(
"Hologram of %1 found, deployment successful.", poActionData.m_MainItem),
"hologramLogs");
106 Debug.Log(
string.Format(
"Pos Comparison | player: %1 | hologram: %2 | action data: %3", poActionData.m_Player.GetPosition(),poActionData.m_Player.GetLocalProjectionPosition(),position),
"hologramLogs");
112 Debug.Log(
string.Format(
"Expected hologram of %1 not found, failing deployment!", poActionData.m_MainItem),
Type().
ToString());
118 position = poActionData.m_Player.GetPosition();
119 orientation = poActionData.m_Player.GetOrientation();
120 position = position + (poActionData.m_Player.GetDirection() *
POSITION_OFFSET);
124 poActionData.m_MainItem.SetIsBeingPlaced(
false);
125 poActionData.m_AlreadyPlaced =
true;
127 entity_for_placing.OnPlacementComplete(poActionData.m_Player, position, orientation);
128 poActionData.m_Player.PlacingCompleteServer();
164 bool accepted = super.AddActionJuncture(action_data);
166 EntityAI targetEntity = action_data.m_MainItem;
169 targetEntity.GetInventory().GetCurrentInventoryLocation(targetIl);
172 if (!
g_Game.AddActionJuncture(action_data.m_Player, targetEntity, 10000, action_data))
179 action_data.m_ReservedInventoryLocations.Insert(targetIl);
208 if (action_data.m_MainItem.IsBasebuildingKit())
211 EntityAI entity_for_placing = action_data.m_MainItem;
212 vector rotation_matrix[3];
217 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
218 Math3D.MatrixToQuat(rotation_matrix, direction);
220 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
222 destination.SetGroundEx(entity_for_placing, position, direction);
224 if (
g_Game.IsMultiplayer())
225 action_data.m_Player.ServerTakeToDst(source, destination);