DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
RemotePlayerDamageDebug.c
Go to the documentation of this file.
2{
3 const int MAX_DAMAGE_RECORDS = 5;
6
8
10 {
11 m_Player = player;
12 }
13
14 void AddDamage(float value_global, float value_blood, float value_shock)
15 {
17 DamageData damage_data = new DamageData( value_global, value_blood, value_shock );
18 m_DamageList.InsertAt(damage_data,0);
19 if( m_DamageList.Count() > MAX_DAMAGE_RECORDS )
20 {
21 m_DamageList.RemoveOrdered(MAX_DAMAGE_RECORDS);
22 }
23 }
24
25 void InsertDamageObject(DamageData damage_object)
26 {
27 m_DamageList.Insert(damage_object);
28 }
29
30
32 {
33 return m_Player;
34 }
35
36
37 void Get(array<ref DamageData> damage_list)
38 {
39 for(int i = 0; i < m_DamageList.Count(); i++)
40 {
41 damage_list.Insert(m_DamageList.Get(i));
42 }
43 }
44
46 {
47 int index = m_DamageList.Count() - 1;
48 for(; index >= 0; index--)
49 {
50 damage_list.Insert(m_DamageList.Get(index));
51 }
52 }
53
55 {
57 {
58 list.Insert(this);
59 }
61 }
62
63 void Debug()
64 {
65 string output;
66 for(int i = 0; i < m_DamageList.Count(); i++)
67 {
68 output = output + m_DamageList.Get(i).ToString() + ", ";
69 }
70 PrintString("damage values for player " + m_Player.ToString()+":" + output);
71
72 }
73
74}
void AddDamage(float value_global, float value_blood, float value_shock)
void GetReversed(array< ref DamageData > damage_list)
void RemotePlayerDamageDebug(PlayerBase player)
void InsertDamageObject(DamageData damage_object)
void Serialize(array< ref RemotePlayerDamageDebug > list)
void Get(array< ref DamageData > damage_list)
ref array< ref DamageData > m_DamageList
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:345