DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ActionStart()

void ActionManagerClient::ActionStart ( ActionBase action,
ActionTarget target,
ItemBase item,
Param extra_data = NULL )
inlineprotected

См. определение в файле ActionManagerClient.c строка 604

605 {
606 if (!m_CurrentActionData && action && ActionPossibilityCheck(m_Player.GetCurrentCommandID()))
607 {
611 m_ActionInputWantEnd = false;
612
613 if (action.CanBePerformedFromQuickbar())
614 m_Player.SetActionEndInput(action);
615
617
618 if (LogManager.IsActionLogEnable())
619 {
620 if ( target )
621 {
622 Debug.ActionLog("Item = " + item + ", " + target.DumpToString(), action.ToString() , "n/a", "ActionStart", m_Player.ToString());
623 }
624 else
625 {
626 Debug.ActionLog("Item = " + item + ", no target", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
627 }
628 }
629 m_Interrupted = false;
630 if (GetGame().IsMultiplayer() && !action.IsLocal())
631 {
632 if (!ScriptInputUserData.CanStoreInputUserData())
633 {
634 DPrint("ScriptInputUserData already posted - ActionManagerClient");
635
636 if (LogManager.IsActionLogEnable())
637 {
638 Debug.ActionLog("Cannot start because ScriptInputUserData is already used", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
639 }
640 return;
641 }
642 }
643
644 if (!action.SetupAction(m_Player, target, item, m_CurrentActionData, extra_data))
645 {
646 DPrint("Can not inicialize action" + action + " - ActionManagerClient");
647 m_CurrentActionData = NULL;
648 return;
649 }
650
651 if (LogManager.IsActionLogEnable())
652 {
653 Debug.ActionLog("Action data created wait to start", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
654 }
655
656 if (GetGame().IsMultiplayer() && !action.IsLocal())
657 {
658 ScriptInputUserData ctx = new ScriptInputUserData;
660 ctx.Write(action.GetID());
661
663
664 if (action.UseAcknowledgment())
665 {
668
670 }
671
672 ctx.Send();
673
674 if (!action.UseAcknowledgment())
675 {
677 if (action.IsInstant())
678 OnActionEnd();
679 }
680 }
681 else
682 {
684 if (action.IsInstant())
685 OnActionEnd();
686 }
687 }
688 }
const int INPUT_UDT_STANDARD_ACTION_START
bool m_Interrupted
Определения ActionManagerBase.c:49
ref ActionData m_CurrentActionData
Определения ActionManagerBase.c:61
bool m_ActionInputWantEnd
Определения ActionManagerBase.c:53
bool ActionPossibilityCheck(int pCurrentCommandID)
Определения ActionManagerBase.c:244
int m_PendingActionAcknowledgmentID
Определения ActionManagerBase.c:59
bool m_ActionWantEndRequest
Определения ActionManagerBase.c:52
DayZPlayer m_Player
Определения Hand_Events.c:42
void Debug()
Определения UniversalTemperatureSource.c:349
int GetID()
Определения ActionBase.c:1360
void Start(ActionData action_data)
Определения ActionBase.c:761
bool CanBePerformedFromQuickbar()
Определения ActionBase.c:303
bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Определения ActionBase.c:156
bool UseAcknowledgment()
Определения ActionBase.c:1162
void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
Определения ActionBase.c:432
bool IsInstant()
Определения ActionBase.c:262
bool IsLocal()
Определения ActionBase.c:256
override void OnActionEnd()
Определения ActionManagerClient.c:781
bool m_ActionWantEndRequest_Send
Определения ActionManagerClient.c:22
void HandleInputsOnActionStart(ActionBase action)
Определения ActionManagerClient.c:690
int m_LastAcknowledgmentID
Определения ActionManagerClient.c:8
bool m_ActionInputWantEnd_Send
Определения ActionManagerClient.c:23
proto native void Send()
proto bool Write(void value_out)
proto native CGame GetGame()
proto void DPrint(string var)
Prints content of variable to console/log. Should be used for critical messages so it will appear in ...
const int UA_AM_PENDING
Определения 3_Game/constants.c:476

Перекрестные ссылки Debug::ActionLog(), ActionPossibilityCheck(), ActionTarget(), ActionBase::CanBePerformedFromQuickbar(), ScriptInputUserData::CanStoreInputUserData(), DPrint(), GetGame(), ActionBase::GetID(), HandleInputsOnActionStart(), INPUT_UDT_STANDARD_ACTION_START, LogManager::IsActionLogEnable(), ActionBase::IsInstant(), ActionBase::IsLocal(), m_ActionInputWantEnd, m_ActionInputWantEnd_Send, m_ActionWantEndRequest, m_ActionWantEndRequest_Send, m_CurrentActionData, m_Interrupted, m_LastAcknowledgmentID, m_PendingActionAcknowledgmentID, m_Player, OnActionEnd(), ScriptInputUserData::Send(), ActionBase::SetupAction(), ActionBase::Start(), UA_AM_PENDING, ActionBase::UseAcknowledgment(), Serializer::Write() и ActionBase::WriteToContext().

Используется в InputsUpdate(), OnInstantAction(), PerformActionFromInventory(), PerformActionFromQuickbar() и PerformActionStart().