12 m_ActionData.m_ActionComponent =
new CAContinuousTime(m_ActionData.m_MainItem.GetDeployTime());
21 protected const float POSITION_OFFSET = 0.5;
25 m_CallbackClass = ActiondeployObjectCB;
32 override void CreateConditionComponents()
38 override bool HasTarget()
43 override bool HasProgress()
54 override void OnFinishProgressServer(
ActionData action_data)
62 if (!action_data.m_MainItem)
65 EntityAI entity_for_placing = action_data.m_MainItem;
70 if (action_data.m_Player.GetHologramServer())
72 position = action_data.m_Player.GetLocalProjectionPosition();
73 orientation = action_data.m_Player.GetLocalProjectionOrientation();
75 action_data.m_Player.GetHologramServer().EvaluateCollision(action_data.m_MainItem);
76 if (
GetGame().IsMultiplayer() && action_data.m_Player.GetHologramServer().IsColliding())
79 action_data.m_Player.GetHologramServer().PlaceEntity(entity_for_placing);
82 action_data.m_Player.GetHologramServer().CheckPowerSource();
86 position = action_data.m_Player.GetPosition();
87 orientation = action_data.m_Player.GetOrientation();
88 position = position + (action_data.m_Player.GetDirection() * POSITION_OFFSET);
91 action_data.m_Player.PlacingCompleteServer();
92 entity_for_placing.OnPlacementComplete(action_data.m_Player, position, orientation);
94 MoveEntityToFinalPosition(action_data, position, orientation);
95 GetGame().ClearJunctureEx(action_data.m_Player, entity_for_placing);
96 action_data.m_MainItem.SetIsBeingPlaced(
false);
98 poActionData.m_AlreadyPlaced =
true;
99 action_data.m_MainItem.SoundSynchRemoteReset();
105 if (!
Class.CastTo(item, player.GetItemInHands()))
108 if (item.IsBasebuildingKit())
111 player.PredictiveDropEntity(item);
116 if (action_data.m_MainItem.IsBasebuildingKit())
119 EntityAI entity_for_placing = action_data.m_MainItem;
120 vector rotation_matrix[3];
125 Math3D.YawPitchRollMatrix(orientation, rotation_matrix);
126 Math3D.MatrixToQuat(rotation_matrix, direction);
128 if (entity_for_placing.GetInventory().GetCurrentInventoryLocation(source))
130 destination.SetGroundEx(entity_for_placing, position, direction);
133 action_data.m_Player.ServerTakeToDst(source, destination);
135 MoveEntityToFinalPositionSinglePlayer(action_data, source, destination);
142 action_data.m_Player.GetInventory().TakeToDst(
InventoryMode.LOCAL, source, destination);