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

◆ OnInputUserDataProcess()

override bool ActionManagerServer::OnInputUserDataProcess ( int userDataType,
ParamsReadContext ctx )
inlineprotected

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

37 {
38 switch (userDataType)
39 {
41 {
42#ifdef ENABLE_LOGGING
43 if ( LogManager.IsActionLogEnable() )
44 {
45 Debug.ActionLog("STS = " + m_Player.GetSimulationTimeStamp() + " INPUT_UDT_STANDARD_ACTION_START", this.ToString() , "n/a", "OnInputUserDataProcess", m_Player.ToString() );
46 }
47#endif
48 bool success = true;
49
50 int actionID = 0;
51 if (!ctx.Read(actionID))
52 return false;
53
54 ActionBase recvAction = GetAction(actionID);
55 if (!recvAction)
56 return false;
57
58 if (!recvAction.ReadFromContext(ctx, m_PendingActionReciveData))
59 success = false;
60
61 m_PendingAction = recvAction;
62
63 if (recvAction.UseAcknowledgment())
64 {
65 int ackID;
66 if (!ctx.Read(ackID))
67 success = false;
68
70 }
71
72 break;
73
74 }
75
77 {
78#ifdef ENABLE_LOGGING
79 if ( LogManager.IsActionLogEnable() )
80 {
81 Debug.ActionLog("STS = " + m_Player.GetSimulationTimeStamp() + " INPUT_UDT_STANDARD_ACTION_END_REQUEST", this.ToString() , "n/a", "OnInputUserDataProcess", m_Player.ToString() );
82 }
83#endif
84 //Debug.Log("Action want end request, STS = " + m_Player.GetSimulationTimeStamp());
85 int commandID = -10;
86 ctx.Read(commandID);
87
88 if (commandID == DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT)
89 {
90 //Print("INPUT_UDT_STANDARD_ACTION_END_REQUEST | CMD_ACTIONINT_INTERRUPT");
92 }
93 else
94 {
95 //Print("INPUT_UDT_STANDARD_ACTION_END_REQUEST | m_ActionWantEndRequest");
97 }
98 }
99
101 {
102#ifdef ENABLE_LOGGING
103 if ( LogManager.IsActionLogEnable() )
104 {
105 Debug.ActionLog("STS = " + m_Player.GetSimulationTimeStamp() + " INPUT_UDT_STANDARD_ACTION_INPUT_END", this.ToString() , "n/a", "OnInputUserDataProcess", m_Player.ToString() );
106 }
107#endif
108 //Debug.Log("Action input ended, STS = " + m_Player.GetSimulationTimeStamp());
110 }
111 default:
112 return false;
113 }
114
115 if (!success)
116 {
117#ifdef ENABLE_LOGGING
118 if ( LogManager.IsActionLogEnable() )
119 {
120 Debug.ActionLog("STS = " + m_Player.GetSimulationTimeStamp() + " !success", this.ToString() , "n/a", "OnInputUserDataProcess", m_Player.ToString() );
121 }
122#endif
123 //Debug.Log("[AM] OnInputUserDataProcess INPUT_UDT_STANDARD_ACTION_START Error");
124 if (recvAction.UseAcknowledgment())
125 {
126 DayZPlayerSyncJunctures.SendActionAcknowledgment(m_Player, m_PendingActionAcknowledgmentID, false);
127 }
128 else
129 {
131 }
132
133 return false;
134 }
135 return true;
136
137 }
const int INPUT_UDT_STANDARD_ACTION_END_REQUEST
const int INPUT_UDT_STANDARD_ACTION_START
const int INPUT_UDT_STANDARD_ACTION_INPUT_END
void ActionBase()
Определения ActionBase.c:82
override ActionBase GetAction()
Определения ActionInput.c:506
bool m_ActionInputWantEnd
Определения ActionManagerBase.c:53
int m_PendingActionAcknowledgmentID
Определения ActionManagerBase.c:59
bool m_ActionWantEndRequest
Определения ActionManagerBase.c:52
string Debug()
Определения CachedEquipmentStorageBase.c:26
DayZPlayer m_Player
Определения Hand_Events.c:42
ref ActionReciveData m_PendingActionReciveData
Определения ActionManagerServer.c:4
override void RequestInterruptAction()
server requests action interrupt
Определения ActionManagerServer.c:371
ActionBase m_PendingAction
Определения ActionManagerServer.c:3
proto bool Read(void value_in)
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602

Перекрестные ссылки ActionBase(), Debug::ActionLog(), GetAction(), INPUT_UDT_STANDARD_ACTION_END_REQUEST, INPUT_UDT_STANDARD_ACTION_INPUT_END, INPUT_UDT_STANDARD_ACTION_START, LogManager::IsActionLogEnable(), m_ActionInputWantEnd, m_ActionWantEndRequest, m_PendingAction, m_PendingActionAcknowledgmentID, m_PendingActionReciveData, m_Player, Serializer::Read(), RequestInterruptAction() и DayZPlayerSyncJunctures::SendActionAcknowledgment().