4 ref ActionReciveData m_PendingActionReciveData;
8 m_PendingAction =
null;
9 m_PendingActionReciveData =
null;
15 override void OnJumpStart()
40 if (!ctx.Read(actionID))
47 if (!recvAction.ReadFromContext(ctx, m_PendingActionReciveData))
50 m_PendingAction = recvAction;
52 if (recvAction.UseAcknowledgment())
95 if (recvAction.UseAcknowledgment())
110 override void StartDeliveredAction()
120 bool accepted =
false;
127 Debug.ActionLog(
"Item = " + item +
", " + target.DumpToString(), pickedAction.ToString() ,
"n/a",
"DeliveredAction",
m_Player.ToString());
130 if (!
m_Player.GetCommandModifier_Action() && !
m_Player.GetCommand_Action() && !
m_Player.IsSprinting() && pickedAction && pickedAction.Can(
m_Player,target,item))
133 if (pickedAction.HasTarget())
136 if (
EntityAI.CastTo(targetEntity,target.GetObject()))
138 if (!
AdvancedCommunication.Cast(targetEntity) && !Building.Cast(targetEntity) && pickedAction.IsLockTargetOnUse())
154 Debug.ActionLog(
"Action accepted", pickedAction.ToString() ,
"n/a",
"CheckDeliveredAction",
m_Player.ToString() );
157 if (pickedAction.UseAcknowledgment())
172 Debug.ActionLog(
"Action rejected", pickedAction.ToString() ,
"n/a",
"CheckDeliveredAction",
m_Player.ToString() );
175 if (pickedAction.UseAcknowledgment())
186 override void OnActionEnd()
194 if (targetEntity.CastTo(targetEntity,
m_CurrentActionData.m_Target.GetObject()) && !Building.Cast(targetEntity))
205 override void Update(
int pCurrentCommandID)
207 super.Update(pCurrentCommandID);
208 int currentCommandID =
m_Player.GetCurrentCommandID();
228 Debug.ActionLog(
"n/a", m_PendingAction.ToString() ,
"n/a",
"HandlePendingAction",
m_Player.ToString() );
239 StartDeliveredAction();
243 if (m_PendingAction.UseAcknowledgment())
254 m_PendingAction =
null;
255 m_PendingActionReciveData =
null;
274 if ( targetEntity.CastTo(targetEntity,
m_CurrentActionData.m_Target.GetObject()) && !Building.Cast(targetEntity) )
329 override void Interrupt()
337 override ActionReciveData GetReciveData()
339 return m_PendingActionReciveData;