Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzplayerimplementfalldamage.c
Go to the documentation of this file.
2 {
3  int m_LandType;
4  float m_Height;
5  float m_HealthCoef;
6  float m_ShockCoef;
7  float m_BrokenLegsCoef;
8  float m_BleedingHandsCoef;
9  float m_BleedingFeetCoef;
10  float m_BleedingLegsCoef;
11  float m_GlovesHealthCoef;
12  float m_ShoesHealthCoef;
13  float m_PantsHealthCoef;
14  float m_BleedingChanceCoef;
15  float m_BleedingChanceLegsCoef;
16 }
17 
19 {
20  static const string FALL_DAMAGE_AMMO_HEALTH = "FallDamageHealth";
21  static const string FALL_DAMAGE_AMMO_SHOCK = "FallDamageShock";
22 
23  static const string FALL_DAMAGE_AMMO_HEALTH_ATTACHMENT = "FallDamageHealthAttachment";
24  static const string FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS = "FallDamageHealthOtherAttachments";
25 
26  const float HEALTH_HEIGHT_LOW = 5;
27  const float HEALTH_HEIGHT_HIGH = 14;
28 
29  private const float SHOCK_HEIGHT_LOW = 3;
30  private const float SHOCK_HEIGHT_HIGH = 12;
31  private const float BROKENLEGS_HEIGHT_LOW = 5;
32  private const float BROKENLEGS_HEIGHT_HIGH = 9;
33 
34  private const float GLOVES_HEALTH_HEIGHT_LOW = 5;
35  private const float GLOVES_HEALTH_HEIGHT_HIGH = 15;
36  private const float SHOES_HEALTH_HEIGHT_LOW = 2;
37  private const float SHOES_HEALTH_HEIGHT_HIGH = 15;
38  private const float PANTS_HEALTH_HEIGHT_LOW = 5;
39  private const float PANTS_HEALTH_HEIGHT_HIGH = 16;
40 
41  private const float BLEEDINGHANDS_HEIGHT_LOW = 5;
42  private const float BLEEDINGFEET_HEIGHT_LOW = 3;
43  private const float BLEEDINGLEGS_HEIGHT_LOW = 10;
44 
45  private const float RANDOM_THRESHOLD_HEALTH_LOW = 0.05;
46  private const float RANDOM_THRESHOLD_HEALTH_HIGH = 0.1;
47  private const float RANDOM_THRESHOLD_LEGS_LOW = 0.05;
48  private const float RANDOM_THRESHOLD_LEGS_HIGH = 0.1;
49  private const float RANDOM_THRESHOLD_ATTACHMENTS_LOW = 0;
50  private const float RANDOM_THRESHOLD_ATTACHMENTS_HIGH = 0.2;
51 
52  private const float BLEEDING_CHANCE_HEIGHT_LOW = 3;
53  private const float BLEEDING_CHANCE_HEIGHT_HIGH = 15;
54 
55  private static const float BROKENLEGS_HEALTH_DAMAGE_MAX = 125;
56 
57  private static const string BLEEDING_HANDS_SELECTIONS[2] = {"LeftForeArmRoll", "RightForeArmRoll"};
58  private static const string BLEEDING_FEET_SELECTIONS[2] = {"LeftFoot", "RightFoot"};
59  private static const string BLEEDING_LEGS_SELECTIONS[2] = {"LeftLeg", "RightLeg"};
60 
61  private const int DAMAGE_TYPE_GLOBAL = 0;
62  private const int DAMAGE_TYPE_LEGS = 1;
63  private const int DAMAGE_TYPE_ATTACHMENTS = 2;
64 
67 
68  #ifdef DIAG_DEVELOPER
69  bool m_Debug = false;
70  private static ref map<string, float> m_AmmoTypeData;
71  #endif
72 
74  {
75  m_Player = pPlayer;
77 
78  #ifdef DIAG_DEVELOPER
79  PreloadAmmoTypeData();
80  #endif
81  }
82 
83  float GetHeight()
84  {
85  return m_FallDamageData.m_Height;
86  }
87 
89  {
90  return m_FallDamageData.m_LandType;
91  }
92 
94  {
95  m_FallDamageData = pData;
96 
97  m_FallDamageData.m_HealthCoef = Math.InverseLerp(HEALTH_HEIGHT_LOW, HEALTH_HEIGHT_HIGH, pData.m_Height);
98  m_FallDamageData.m_HealthCoef = Randomize(DAMAGE_TYPE_GLOBAL, m_FallDamageData.m_HealthCoef);
99  m_FallDamageData.m_HealthCoef = Math.Clamp(m_FallDamageData.m_HealthCoef, 0, 1);
100 
101  m_FallDamageData.m_ShockCoef = Math.InverseLerp(SHOCK_HEIGHT_LOW, SHOCK_HEIGHT_HIGH, pData.m_Height);
102  m_FallDamageData.m_ShockCoef = Math.Clamp(m_FallDamageData.m_ShockCoef, 0, 1);
103 
104  m_FallDamageData.m_BrokenLegsCoef = Math.InverseLerp(BROKENLEGS_HEIGHT_LOW, BROKENLEGS_HEIGHT_HIGH, pData.m_Height);
105  m_FallDamageData.m_BrokenLegsCoef = Randomize(DAMAGE_TYPE_LEGS, m_FallDamageData.m_BrokenLegsCoef);
106  m_FallDamageData.m_BrokenLegsCoef = Math.Clamp(m_FallDamageData.m_BrokenLegsCoef, 0, 1);
107 
108  m_FallDamageData.m_BleedingHandsCoef = Math.InverseLerp(0, BLEEDINGHANDS_HEIGHT_LOW, pData.m_Height);
109  m_FallDamageData.m_BleedingHandsCoef = Math.Clamp(m_FallDamageData.m_BleedingHandsCoef, 0, 1);
110 
111  m_FallDamageData.m_BleedingFeetCoef = Math.InverseLerp(0, BLEEDINGFEET_HEIGHT_LOW, pData.m_Height);
112  m_FallDamageData.m_BleedingFeetCoef = Math.Clamp(m_FallDamageData.m_BleedingFeetCoef, 0, 1);
113 
114  m_FallDamageData.m_BleedingLegsCoef = Math.InverseLerp(0, BLEEDINGLEGS_HEIGHT_LOW, pData.m_Height);
115  m_FallDamageData.m_BleedingLegsCoef = Math.Clamp(m_FallDamageData.m_BleedingLegsCoef, 0, 1);
116 
117  m_FallDamageData.m_GlovesHealthCoef = Math.InverseLerp(GLOVES_HEALTH_HEIGHT_LOW, GLOVES_HEALTH_HEIGHT_HIGH, pData.m_Height);
118  m_FallDamageData.m_GlovesHealthCoef = Randomize(DAMAGE_TYPE_ATTACHMENTS, m_FallDamageData.m_GlovesHealthCoef);
119  m_FallDamageData.m_GlovesHealthCoef = Math.Clamp(m_FallDamageData.m_GlovesHealthCoef, 0, 1);
120 
121  m_FallDamageData.m_ShoesHealthCoef = Math.InverseLerp(SHOES_HEALTH_HEIGHT_LOW, SHOES_HEALTH_HEIGHT_HIGH, pData.m_Height);
122  m_FallDamageData.m_ShoesHealthCoef = Randomize(DAMAGE_TYPE_ATTACHMENTS, m_FallDamageData.m_ShoesHealthCoef);
123  m_FallDamageData.m_ShoesHealthCoef = Math.Clamp(m_FallDamageData.m_ShoesHealthCoef, 0, 1);
124 
125  m_FallDamageData.m_PantsHealthCoef = Math.InverseLerp(PANTS_HEALTH_HEIGHT_LOW, PANTS_HEALTH_HEIGHT_HIGH, pData.m_Height);
126  m_FallDamageData.m_PantsHealthCoef = Randomize(DAMAGE_TYPE_ATTACHMENTS, m_FallDamageData.m_PantsHealthCoef);
127  m_FallDamageData.m_PantsHealthCoef = Math.Clamp(m_FallDamageData.m_PantsHealthCoef, 0, 1);
128 
129  m_FallDamageData.m_BleedingChanceCoef = Math.InverseLerp(BLEEDING_CHANCE_HEIGHT_LOW, BLEEDING_CHANCE_HEIGHT_HIGH, pData.m_Height);
130  m_FallDamageData.m_BleedingChanceCoef = Math.Clamp(m_FallDamageData.m_BleedingChanceCoef, 0, 0.7);
131 
132  m_FallDamageData.m_BleedingChanceLegsCoef = 0.15;
133 
134  if (GetGame().IsServer())
135  {
136  PlayerBase playerBase = PlayerBase.Cast(m_Player);
137  if (playerBase)
138  {
139  AttachBleedingToZonesByHeight(playerBase);
140  DamageAttachedGear(playerBase);
141  playerBase.DamageAllLegs(BROKENLEGS_HEALTH_DAMAGE_MAX * m_FallDamageData.m_BrokenLegsCoef);
142  }
143 
144  vector posMS = m_Player.WorldToModel(m_Player.GetPosition());
145 
146  m_Player.ProcessDirectDamage(DamageType.CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_HEALTH, posMS, m_FallDamageData.m_HealthCoef);
147  m_Player.ProcessDirectDamage(DamageType.CUSTOM, m_Player, "", FALL_DAMAGE_AMMO_SHOCK, posMS, m_FallDamageData.m_ShockCoef);
148 
149  if (playerBase)
150  playerBase.ForceUpdateInjuredState();
151  }
152  }
153 
154  private float Randomize(int pType, float pValue)
155  {
156  Math.Randomize(GetGame().GetTime());
157 
158  int randomizedSign = -1;
159  if (Math.RandomIntInclusive(1, 2) % 2 == 1)
160  randomizedSign = 1;
161 
162  float randomizationValue = 0;
163  switch (pType)
164  {
165  case DAMAGE_TYPE_GLOBAL:
166  randomizationValue = Math.RandomFloatInclusive(RANDOM_THRESHOLD_HEALTH_LOW, RANDOM_THRESHOLD_HEALTH_HIGH);
167  break;
168  case DAMAGE_TYPE_LEGS:
169  randomizationValue = Math.RandomFloatInclusive(RANDOM_THRESHOLD_LEGS_LOW, RANDOM_THRESHOLD_LEGS_HIGH);
170  break;
172  randomizationValue = Math.RandomFloatInclusive(RANDOM_THRESHOLD_ATTACHMENTS_LOW, RANDOM_THRESHOLD_ATTACHMENTS_HIGH);
173  break;
174  }
175 
176  return pValue + (randomizedSign * pValue * randomizationValue);
177  }
178 
179  private void AttachBleedingToZonesByHeight(notnull PlayerBase pPlayer)
180  {
181  Math.Randomize(GetGame().GetTime());
182 
183  int bleedingSelectionIndex;
184  BleedingSourcesManagerServer bleedingManager = pPlayer.GetBleedingManagerServer();
185  if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingHandsCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Gloves") == null)
186  {
187  bleedingSelectionIndex = Math.RandomInt(0, 2);
188  bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_HANDS_SELECTIONS[bleedingSelectionIndex]);
189  }
190 
191  if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceCoef && m_FallDamageData.m_BleedingFeetCoef == 1.0 && pPlayer.FindAttachmentBySlotName("Feet") == null)
192  {
193 
194  bleedingSelectionIndex = Math.RandomInt(0, 2);
195  bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_FEET_SELECTIONS[bleedingSelectionIndex]);
196  }
197  if (Math.RandomFloatInclusive(0.0, 1.0) <= m_FallDamageData.m_BleedingChanceLegsCoef && m_FallDamageData.m_BleedingLegsCoef == 1.0)
198  {
199 
200  bleedingSelectionIndex = Math.RandomInt(0, 2);
201  bleedingManager.AttemptAddBleedingSourceBySelection(BLEEDING_LEGS_SELECTIONS[bleedingSelectionIndex]);
202  }
203  }
204 
205  private void DamageAttachedGear(notnull PlayerBase pPlayer)
206  {
207  EntityAI gloves = pPlayer.FindAttachmentBySlotName("Gloves");
208  if (gloves)
209  gloves.ProcessDirectDamage(DT_CUSTOM, pPlayer, "", FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS, gloves.WorldToModel(gloves.GetPosition()), m_FallDamageData.m_GlovesHealthCoef);
210 
211  EntityAI shoes = pPlayer.FindAttachmentBySlotName("Feet");
212  if (shoes)
213  shoes.ProcessDirectDamage(DT_CUSTOM, pPlayer, "", FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS, shoes.WorldToModel(shoes.GetPosition()), m_FallDamageData.m_ShoesHealthCoef);
214 
215  EntityAI pants = pPlayer.FindAttachmentBySlotName("Legs");
216  if (pants)
217  pants.ProcessDirectDamage(DT_CUSTOM, pPlayer, "", FALL_DAMAGE_AMMO_HEALTH_ATTACHMENT, pants.WorldToModel(pants.GetPosition()), m_FallDamageData.m_PantsHealthCoef);
218  }
219 
220 #ifdef DIAG_DEVELOPER
221  FallDamageDebugData GetFallDamageDebugData()
222  {
223  FallDamageDebugData data = new FallDamageDebugData();
224  data.Synch(this);
225 
226  return data;
227  }
228 
229  void ShowFallDamageDebugInfo(bool enabled)
230  {
231  FallDamageDebugData data = GetFallDamageDebugData();
232  DisplayFallDamageDebugInfo(enabled, data);
233  }
234 
235  private static string LandTypeToString(int landType)
236  {
237  switch (landType)
238  {
239  case 1:
240  return "LIGHT";
241  case 2:
242  return "MEDIUM";
243  case 3:
244  return "HEAVY":
245  }
246 
247  return "NONE";
248  }
249 
250  private void PreloadAmmoTypeData()
251  {
252  if (m_AmmoTypeData == null)
253  m_AmmoTypeData = new ref map<string, float>();
254 
255  m_AmmoTypeData.Insert(FALL_DAMAGE_AMMO_HEALTH, GetValuesFromAmmoType(FALL_DAMAGE_AMMO_HEALTH)[0]);
256  m_AmmoTypeData.Insert(FALL_DAMAGE_AMMO_SHOCK, GetValuesFromAmmoType(FALL_DAMAGE_AMMO_SHOCK)[2]);
257  m_AmmoTypeData.Insert(FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS, GetValuesFromAmmoType(FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS)[0]);
258  m_AmmoTypeData.Insert(FALL_DAMAGE_AMMO_HEALTH_ATTACHMENT, GetValuesFromAmmoType(FALL_DAMAGE_AMMO_HEALTH_ATTACHMENT)[0]);
259  }
260 
261  private vector GetValuesFromAmmoType(string pAmmoType)
262  {
263  vector values = vector.Zero;
264  values[0] = GetGame().ConfigGetFloat(string.Format("CfgAmmo %1 DamageApplied Health damage", pAmmoType));
265  values[1] = GetGame().ConfigGetFloat(string.Format("CfgAmmo %1 DamageApplied Blood damage", pAmmoType));
266  values[2] = GetGame().ConfigGetFloat(string.Format("CfgAmmo %1 DamageApplied Shock damage", pAmmoType));
267 
268  return values;
269  }
270 
271  static void DisplayFallDamageDebugInfo(bool enabled, FallDamageDebugData data)
272  {
273  int windowPosX = 10;
274  int windowPosY = 200;
275 
276  DbgUI.Begin("Fall Damage (last)", windowPosX, windowPosY);
277  if (enabled)
278  {
279  DbgUI.Text(string.Format("Height:\t%1", Math.Clamp(data.m_Height, 0, float.MAX)));
280  DbgUI.Text(string.Format("Land Type:\t%1 (%2)", data.m_LandType, LandTypeToString(data.m_LandType)));
281  DbgUI.Text("");
282  DbgUI.Text("Health");
283  DbgUI.Text(string.Format(" coef:%1 dmg:%2", data.m_HealthCoef, m_AmmoTypeData[FALL_DAMAGE_AMMO_HEALTH] * data.m_HealthCoef));
284  DbgUI.Text("Shock");
285  DbgUI.Text(string.Format(" coef:%1 dmg:%2", data.m_ShockCoef, m_AmmoTypeData[FALL_DAMAGE_AMMO_SHOCK] * data.m_ShockCoef));
286  DbgUI.Text("Broken Legs:");
287  DbgUI.Text(string.Format(" coef:%1 dmg:%2", data.m_BrokenLegsCoef, BROKENLEGS_HEALTH_DAMAGE_MAX * data.m_BrokenLegsCoef));
288  DbgUI.Text("Gloves damage:");
289  DbgUI.Text(string.Format(" coef:%1 dmg:%2", data.m_GlovesHealthCoef, m_AmmoTypeData[FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS] * data.m_GlovesHealthCoef));
290  DbgUI.Text("Shoes damage:");
291  DbgUI.Text(string.Format(" coef:%1 dmg:%2", data.m_ShoesHealthCoef, m_AmmoTypeData[FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS] * data.m_ShoesHealthCoef));
292  DbgUI.Text("Pants damage:");
293  DbgUI.Text(string.Format(" coef:%1 dmg:%2" , data.m_PantsHealthCoef, m_AmmoTypeData[FALL_DAMAGE_AMMO_HEALTH_ATTACHMENT] * data.m_PantsHealthCoef));
294  DbgUI.Text("Bleeding coefs:");
295  DbgUI.Text(string.Format(" hands:%1", data.m_BleedingHandsCoef));
296  DbgUI.Text(string.Format(" feet:%1", data.m_BleedingFeetCoef));
297  DbgUI.Text(string.Format(" legs:%1", data.m_BleedingLegsCoef));
298  DbgUI.Text(string.Format(" H&F chance:%1", data.m_BleedingChanceCoef));
299 
300 
301  }
302  DbgUI.End();
303  }
304 
305  void FillDebugFallDamageData(FallDamageDebugData data)
306  {
307  data.m_Height = m_FallDamageData.m_Height;
308  data.m_LandType = m_FallDamageData.m_LandType;
309  data.m_HealthCoef = m_FallDamageData.m_HealthCoef;
310  data.m_ShockCoef = m_FallDamageData.m_ShockCoef;
311  data.m_BrokenLegsCoef = m_FallDamageData.m_BrokenLegsCoef;
312  data.m_GlovesHealthCoef = m_FallDamageData.m_GlovesHealthCoef;
313  data.m_ShoesHealthCoef = m_FallDamageData.m_ShoesHealthCoef;
314  data.m_PantsHealthCoef = m_FallDamageData.m_PantsHealthCoef;
315 
316  data.m_BleedingHandsCoef = m_FallDamageData.m_BleedingHandsCoef;
317  data.m_BleedingFeetCoef = m_FallDamageData.m_BleedingFeetCoef;
318  data.m_BleedingLegsCoef = m_FallDamageData.m_BleedingLegsCoef;
319  data.m_BleedingChanceCoef = m_FallDamageData.m_BleedingChanceCoef;
320  }
321 #endif
322 
326  const string FD_AMMO = "FallDamage";
327  const float FD_DMG_FROM_HEIGHT = 2.5;
328  const float FD_MAX_DMG_AT_HEIGHT = 15;
329  const float FD_MAX_HEIGHT_LEG_BREAK = 8;
330 
331  void HandleFallDamage(float pHeight);
332  float DamageCoef(float pHeight);
333 }
334 
335 #ifdef DIAG_DEVELOPER
336 class FallDamageDebugData : Param
337 {
338  int m_LandType;
339  float m_Height;
340  float m_HealthCoef;
341  float m_ShockCoef;
342  float m_BrokenLegsCoef;
343  float m_GlovesHealthCoef;
344  float m_ShoesHealthCoef;
345  float m_PantsHealthCoef;
346  float m_BleedingHandsCoef;
347  float m_BleedingFeetCoef;
348  float m_BleedingLegsCoef;
349  float m_BleedingChanceCoef;
350 
351  void Synch(DayZPlayerImplementFallDamage fallDamage)
352  {
353  m_Height = fallDamage.GetHeight();
354  m_LandType = fallDamage.GetLandType();
355 
356  fallDamage.FillDebugFallDamageData(this);
357  }
358 
359  override bool Serialize(Serializer ctx)
360  {
361  return ctx.Write(m_Height) && ctx.Write(m_LandType) && ctx.Write(m_HealthCoef) && ctx.Write(m_ShockCoef) && ctx.Write(m_BrokenLegsCoef) && ctx.Write(m_GlovesHealthCoef) && ctx.Write(m_ShoesHealthCoef) && ctx.Write(m_PantsHealthCoef) && ctx.Write(m_BleedingHandsCoef) && ctx.Write(m_BleedingFeetCoef) && ctx.Write(m_BleedingLegsCoef);
362  }
363 
364  override bool Deserializer(Serializer ctx)
365  {
366  return ctx.Read(m_Height) && ctx.Read(m_LandType) && ctx.Read(m_HealthCoef) && ctx.Read(m_ShockCoef) && ctx.Write(m_BrokenLegsCoef) && ctx.Read(m_GlovesHealthCoef) && ctx.Read(m_ShoesHealthCoef) && ctx.Read(m_PantsHealthCoef) && ctx.Read(m_BleedingHandsCoef) && ctx.Read(m_BleedingFeetCoef) && ctx.Read(m_BleedingLegsCoef);
367  }
368 }
369 #endif
GetGame
proto native CGame GetGame()
RANDOM_THRESHOLD_ATTACHMENTS_HIGH
const private float RANDOM_THRESHOLD_ATTACHMENTS_HIGH
Definition: dayzplayerimplementfalldamage.c:50
BLEEDINGFEET_HEIGHT_LOW
const private float BLEEDINGFEET_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:42
HEALTH_HEIGHT_LOW
const float HEALTH_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:26
RANDOM_THRESHOLD_LEGS_LOW
const private float RANDOM_THRESHOLD_LEGS_LOW
Definition: dayzplayerimplementfalldamage.c:47
Param
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition: param.c:11
DAMAGE_TYPE_GLOBAL
const private int DAMAGE_TYPE_GLOBAL
Definition: dayzplayerimplementfalldamage.c:61
DbgUI
Definition: dbgui.c:59
BLEEDING_CHANCE_HEIGHT_HIGH
const private float BLEEDING_CHANCE_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:53
RANDOM_THRESHOLD_LEGS_HIGH
const private float RANDOM_THRESHOLD_LEGS_HIGH
Definition: dayzplayerimplementfalldamage.c:48
BLEEDINGHANDS_HEIGHT_LOW
const private float BLEEDINGHANDS_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:41
SHOCK_HEIGHT_HIGH
const private float SHOCK_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:30
DAMAGE_TYPE_ATTACHMENTS
const private int DAMAGE_TYPE_ATTACHMENTS
Definition: dayzplayerimplementfalldamage.c:63
BLEEDING_CHANCE_HEIGHT_LOW
const private float BLEEDING_CHANCE_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:52
HEALTH_HEIGHT_HIGH
const float HEALTH_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:27
PANTS_HEALTH_HEIGHT_HIGH
const private float PANTS_HEALTH_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:39
FD_AMMO
const string FD_AMMO
ammo type used for damaging
Definition: dayzplayerimplementfalldamage.c:326
FD_MAX_HEIGHT_LEG_BREAK
const float FD_MAX_HEIGHT_LEG_BREAK
height where legs break most of the time
Definition: dayzplayerimplementfalldamage.c:329
m_Player
DayZPlayer m_Player
Definition: dayzplayerimplementfalldamage.c:65
DayZPlayer
Definition: dayzplayerimplement.c:72
FD_MAX_DMG_AT_HEIGHT
const float FD_MAX_DMG_AT_HEIGHT
height where player gets 100% damage
Definition: dayzplayerimplementfalldamage.c:328
BROKENLEGS_HEIGHT_HIGH
const private float BROKENLEGS_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:32
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
GetHeight
float GetHeight()
Definition: dayzplayerimplementfalldamage.c:83
FD_DMG_FROM_HEIGHT
const float FD_DMG_FROM_HEIGHT
damage will not be taken into account bellow this HeightToDamage
Definition: dayzplayerimplementfalldamage.c:327
PlayerBase
Definition: playerbaseclient.c:1
map
map
Definition: controlsxboxnew.c:3
PANTS_HEALTH_HEIGHT_LOW
const private float PANTS_HEALTH_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:38
vector
Definition: enconvert.c:105
DAMAGE_TYPE_LEGS
const private int DAMAGE_TYPE_LEGS
Definition: dayzplayerimplementfalldamage.c:62
RANDOM_THRESHOLD_HEALTH_LOW
const private float RANDOM_THRESHOLD_HEALTH_LOW
Definition: dayzplayerimplementfalldamage.c:45
windowPosX
class PresenceNotifierNoiseEvents windowPosX
dbgUI settings
windowPosY
const int windowPosY
Definition: pluginpresencenotifier.c:80
SHOES_HEALTH_HEIGHT_HIGH
const private float SHOES_HEALTH_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:37
DamageType
DamageType
exposed from C++ (do not change)
Definition: damagesystem.c:10
Serialize
void Serialize()
Definition: inventory.c:193
RANDOM_THRESHOLD_ATTACHMENTS_LOW
const private float RANDOM_THRESHOLD_ATTACHMENTS_LOW
Definition: dayzplayerimplementfalldamage.c:49
RANDOM_THRESHOLD_HEALTH_HIGH
const private float RANDOM_THRESHOLD_HEALTH_HIGH
Definition: dayzplayerimplementfalldamage.c:46
FALL_DAMAGE_AMMO_HEALTH
class FallDamageData FALL_DAMAGE_AMMO_HEALTH
BLEEDINGLEGS_HEIGHT_LOW
const private float BLEEDINGLEGS_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:43
DayZPlayerImplementFallDamage
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
Definition: dayzplayerimplementfalldamage.c:73
SHOES_HEALTH_HEIGHT_LOW
const private float SHOES_HEALTH_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:36
GLOVES_HEALTH_HEIGHT_HIGH
const private float GLOVES_HEALTH_HEIGHT_HIGH
Definition: dayzplayerimplementfalldamage.c:35
FallDamageData
Definition: dayzplayerimplementfalldamage.c:1
Randomize
private float Randomize(int pType, float pValue)
Definition: dayzplayerimplementfalldamage.c:154
Synch
protected void Synch(EntityAI victim)
keeping "step" here for consistency only
Definition: trapbase.c:298
GetLandType
int GetLandType()
Definition: dayzplayerimplementfalldamage.c:88
m_FallDamageData
private ref FallDamageData m_FallDamageData
Definition: dayzplayerimplementfalldamage.c:66
GetTime
float GetTime()
Definition: notificationsystem.c:35
SHOCK_HEIGHT_LOW
const private float SHOCK_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:29
DamageAttachedGear
private void DamageAttachedGear(notnull PlayerBase pPlayer)
Definition: dayzplayerimplementfalldamage.c:205
GLOVES_HEALTH_HEIGHT_LOW
const private float GLOVES_HEALTH_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:34
DamageCoef
float DamageCoef(float pHeight)
Math
Definition: enmath.c:6
BROKENLEGS_HEIGHT_LOW
const private float BROKENLEGS_HEIGHT_LOW
Definition: dayzplayerimplementfalldamage.c:31
EntityAI
Definition: building.c:5
AttachBleedingToZonesByHeight
private void AttachBleedingToZonesByHeight(notnull PlayerBase pPlayer)
Definition: dayzplayerimplementfalldamage.c:179
HandleFallDamage
void HandleFallDamage(FallDamageData pData)
Definition: dayzplayerimplementfalldamage.c:93