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

◆ Tick()

void PluginDayzPlayerDebug_Weapons::Tick ( )
inlineprivate

update running action

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

237 {
238 DayZPlayer player = DayZPlayer.Cast( GetGame().GetPlayer() );
239 if (!player)
240 {
241 return;
242 }
243
244 if (player)
245 {
246 EntityAI entityInHands = player.GetHumanInventory().GetEntityInHands();
247 Weapon_Base w;
248 if (Class.CastTo(w, entityInHands))
249 {
250 if (m_CurrentWeapon != w)
251 WeaponsInit(w);
252 }
253 else
254 {
255 m_Selector.ClearItems();
256 }
257 }
258
260 HumanCommandWeapons hcw = player.GetCommandModifier_Weapons();
261
262 string text = "Action: " + hcw.GetRunningAction().ToString() + " " + hcw.GetRunningActionType().ToString();
263 m_WidgetActionRunning.SetText(text);
264
265
266 int aEvent = hcw.DebugIsEvent();
267 if (aEvent != -1)
268 {
269 string eventStr = "Event: ";
270 eventStr = eventStr + aEvent.ToString() + " ";
271 while(true)
272 {
273 aEvent = hcw.DebugIsEvent();
274 if (aEvent == -1)
275 {
276 break;
277 }
278
279 Print("Event: " + aEvent.ToString());
280
281 eventStr += aEvent.ToString();
282 eventStr += " ";
283 }
284
285 m_WidgetActionEvents.SetText(eventStr);
286 }
287 }
class LogManager EntityAI
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native int DebugIsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native int GetRunningActionType()
returns -1 when no action is running or appropriate action type
void WeaponsInit(Weapon_Base w)
TextListboxWidget m_Selector
Определения PluginDayzPlayerDebug_Weapons.c:56
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
void HumanCommandWeapons()
Определения human.c:1113

Перекрестные ссылки Class::CastTo(), HumanCommandWeapons::DebugIsEvent(), GetGame(), GetPlayer(), HumanCommandWeapons::GetRunningAction(), HumanCommandWeapons::GetRunningActionType(), m_CurrentWeapon, m_Selector, m_WidgetActionEvents, m_WidgetActionRunning, Print() и WeaponsInit().