DayZ 1.24
Loading...
Searching...
No Matches
RemotePlayerStatDebug.c
Go to the documentation of this file.
8
9
11{
14 string m_Name;
22
23 void Init()
24 {
27 m_Pos = m_Player.GetWorldPosition();
28 m_Name = m_Player.GetIdentity().GetName();
29 }
30
32 {
33 return m_Player;
34 }
35
37 {
38 m_Player.GetPlayerStats().GetDebugInfo(m_Stats, 0);
39 }
40
42 {
43 m_Stats.Insert(new StatDebugObject("Health", m_Player.GetHealth("", ""), eRemoteStatType.DAMAGE_SYSTEM));
44 m_Stats.Insert(new StatDebugObject("Blood", m_Player.GetHealth("", "Blood"), eRemoteStatType.DAMAGE_SYSTEM));
45 m_Stats.Insert(new StatDebugObject("Shock", m_Player.GetHealth("", "Shock"), eRemoteStatType.DAMAGE_SYSTEM));
46 }
47
49 {
50 for (int i = 0; i < m_Stats.Count(); i++)
51 {
52 if (type == eRemoteDebugType.ALL)
53 names.Insert(m_Stats.Get(i).GetName());
54 else if (type == eRemoteDebugType.DAMAGE_ONLY)
55 {
56 StatDebugObject obj = m_Stats.Get(i);
58 if (debug_type == eRemoteStatType.DAMAGE_SYSTEM)
59 names.Insert(m_Stats.Get(i).GetName());
60 }
61 }
62 }
63
65 {
66 for (int i = 0; i < m_Stats.Count(); i++)
67 {
68 if (type == eRemoteDebugType.ALL)
69 values.Insert(m_Stats.Get(i).GetValue());
70 else if (type == eRemoteDebugType.DAMAGE_ONLY)
71 {
72 StatDebugObject obj = m_Stats.Get(i);
74 if (debug_type == eRemoteStatType.DAMAGE_SYSTEM)
75 values.Insert(m_Stats.Get(i).GetValue());
76 }
77 }
78 }
79
80 void Debug()
81 {
82 for (int i = 0; i < m_Stats.Count(); i++)
83 m_Stats.Get(i).Debug();
84 }
85
86}
string m_Name
override Widget Init()
Definition DayZGame.c:120
DayZPlayer m_Player
Definition Hand_Events.c:42
PlayerBase GetPlayer()
void SerializeValues(array< string > values, eRemoteDebugType type)
vector m_Pos
void InjectDamageSystemValues()
ref array< ref StatDebugObject > m_Stats
@ DAMAGE_SYSTEM
@ PLAYER_STATS
void UpdatePlayerStatsValues()
void RemotePlayerStatDebug(PlayerBase player)
void SerializeNames(array< string > names, eRemoteDebugType type)
eRemoteDebugType GetType()