Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
injuredlegnotfr.c
Go to the documentation of this file.
2 {
4  {
5  m_Active = true;
6  }
7 
8  override int GetNotifierType()
9  {
10  return eNotifiers.NTF_LEGS;
11  }
12 
13 
14  override void DisplayBadge()
15  {
16  DisplayElementBadge dis_elm = DisplayElementBadge.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_BADGE_LEGS));
17 
18 
19  if ( dis_elm )
20  {
21  float legHealthInverted = 1 - Math.Min(m_Player.GetHealth01("LeftLeg",""), m_Player.GetHealth01("RightLeg",""));
22  int level = eBadgeLevel.NONE;
23  if (m_Player.GetBrokenLegs() == eBrokenLegs.NO_BROKEN_LEGS)
24  level = DetermineBadgeLevel(legHealthInverted, 0.05, 0.35, 0.65);
25  dis_elm.SetLevel(level);
26  }
27  }
28 
29  override void HideBadge()
30  {
31  DisplayElementBadge dis_elm = DisplayElementBadge.Cast(GetVirtualHud().GetElement(eDisplayElements.DELM_BADGE_LEGS));
32  if ( dis_elm )
33  {
34  dis_elm.SetLevel(eBadgeLevel.NONE);
35  }
36  }
37 };
eBadgeLevel
eBadgeLevel
Definition: _constants.c:1
GetElement
DisplayElementBase GetElement(eDisplayElements element_id)
Definition: displaystatus.c:95
DisplayElementBadge
Definition: badgebleeding.c:1
eBrokenLegs
eBrokenLegs
Definition: ebrokenlegs.c:1
GetVirtualHud
VirtualHud GetVirtualHud()
Definition: notifiersmanager.c:77
NotifiersManager
void NotifiersManager(PlayerBase player)
Definition: notifiersmanager.c:36
m_Player
DayZPlayer m_Player
Definition: hand_events.c:42
NotifierBase
Definition: notifierbase.c:1
eNotifiers
eNotifiers
Definition: notifiersmanager.c:1
InjuredLegNotfr
Definition: injuredlegnotfr.c:1
Math
Definition: enmath.c:6