DayZ 1.24
Loading...
Searching...
No Matches
HeatComfortAnimHandler.c
Go to the documentation of this file.
2{
3 const float TICK_INTERVAL = 2;
7
9 float m_EventTimeFreeze = -1;
10 float m_EventTimeHot = -1;
12
15
18
23
34
43
44
45 void Process(float delta_time)
46 {
47 if (GetGame().IsServer())
48 {
49
50 float hc = m_Player.GetStatHeatComfort().Get();
51 float inv_value;
52 float value_min;
53 float value_max;
54 float offset_time;
55
57 {
59
60 if (m_EventTimeFreeze < 0) //if not set
62
64 {
67 m_Player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_FREEZE);
68 /*
69 Print("-----======== freezing ========-------");
70 Print(inv_value);
71 Print(value_min);
72 Print(value_max);
73 Print(offset_time);
74 Print("-----======== freezing ========-------");
75 */
76 }
77 }
79 {
81
82 if (m_EventTimeHot < 0) //if not set
84
86 {
88 m_EventTimeHot = -1;
89 m_Player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HOT);
90
91 //Print("-----======== freezing ========-------");
92 //Print(inv_value);
93 //Print(value_min);
94 //Print(value_max);
95 //Print(offset_time);
96 //Print("-----======== freezing ========-------");
97
98 }
99 }
100 }
101 }
102}
void Update(float delta_time, HumanMovementState hms)
ref HumanMovementState m_MovementState
void Process(float delta_time)
float GetEventTime(float hc_value, float threshold_low, float threshold_high, float low_min, float high_min, float low_max, float high_max)
void HeatComfortAnimHandler(PlayerBase player)
Definition EnMath.c:7
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const float THRESHOLD_HEAT_COMFORT_PLUS_WARNING
static const float THRESHOLD_HEAT_COMFORT_PLUS_EMPTY
static const float THRESHOLD_HEAT_COMFORT_MINUS_EMPTY
proto native CGame GetGame()
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...