DayZ 1.24
Loading...
Searching...
No Matches
InjuredLegNotfr.c
Go to the documentation of this file.
2{
7
8 override int GetNotifierType()
9 {
10 return eNotifiers.NTF_LEGS;
11 }
12
13
14 override void DisplayBadge()
15 {
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 {
32 if (dis_elm)
33 dis_elm.SetLevel(eBadgeLevel.NONE);
34 }
35};
eBadgeLevel
Definition _constants.c:2
DisplayElementBase GetElement(eDisplayElements element_id)
eBrokenLegs
Definition EBrokenLegs.c:2
void NotifiersManager(PlayerBase player)
eNotifiers
void InjuredLegNotfr(NotifiersManager manager)
override void DisplayBadge()
override void HideBadge()
override int GetNotifierType()
Definition EnMath.c:7
PlayerBase m_Player
Definition NotifierBase.c:6
eBadgeLevel DetermineBadgeLevel(float value, float lvl_1, float lvl_2, float lvl_3)
VirtualHud GetVirtualHud()
static proto float Min(float x, float y)
Returns smaller of two given values.