DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HeatComfortAnimHandler.c
См. документацию.
2{
3 const float TICK_INTERVAL = 2;
8
12 float m_EventTimeHot = -1;
14
17
20
22 {
23 m_Player = player;
24 }
25
26 void Update(float delta_time, HumanMovementState hms)
27 {
28 m_TimeSinceLastTick += delta_time;
29
31 {
34 }
35 }
36
37 float GetEventTime(float hc_value ,float threshold_low, float threshold_high, float low_min, float high_min, float low_max, float high_max)
38 {
39 float inv_value = Math.InverseLerp(threshold_low, threshold_high, hc_value);
40 float value_min = Math.Lerp(low_min, high_min,inv_value);
41 float value_max = Math.Lerp(low_max,high_max,inv_value);
42
43 return Math.RandomFloatInclusive(value_min,value_max);
44 }
45
46
47 void Process(float delta_time)
48 {
49 if( GetGame().IsServer() )
50 {
51
52 float hc = m_Player.GetStatHeatComfort().Get();
53 float inv_value;
54 float value_min;
55 float value_max;
56 float offset_time;
57
59 {
61
64
66 {
69 m_Player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_FREEZE_RATTLE);
70 }
71 }
72
74 {
76
77 if(m_EventTimeFreeze < 0)//if not set
78 {
80 }
81
83 {
86 m_Player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_FREEZE);
87 /*
88 Print("-----======== freezing ========-------");
89 Print(inv_value);
90 Print(value_min);
91 Print(value_max);
92 Print(offset_time);
93 Print("-----======== freezing ========-------");
94 */
95 }
96 }
98 {
100
101 if(m_EventTimeHot < 0)//if not set
102 {
104 }
105
107 {
109 m_EventTimeHot = -1;
110 m_Player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HOT);
111
112 //Print("-----======== freezing ========-------");
113 //Print(inv_value);
114 //Print(value_min);
115 //Print(value_max);
116 //Print(offset_time);
117 //Print("-----======== freezing ========-------");
118
119 }
120 }
121 }
122 }
123}
void Process()
Определения EffectManager.c:743
float m_ProcessTimeAccuHot
Определения HeatComfortAnimHandler.c:7
void Update(float delta_time, HumanMovementState hms)
Определения HeatComfortAnimHandler.c:26
ref HumanMovementState m_MovementState
Определения HeatComfortAnimHandler.c:13
float m_ProcessTimeAccuFreeze
Определения HeatComfortAnimHandler.c:5
float m_ProcessTimeAccuFreezeRattle
Определения HeatComfortAnimHandler.c:6
float m_EventTimeFreeze
Определения HeatComfortAnimHandler.c:10
void Process(float delta_time)
Определения HeatComfortAnimHandler.c:47
const float TIME_INTERVAL_HC_MINUS_HIGH_MAX
Определения HeatComfortAnimHandler.c:16
float m_TimeSinceLastTick
Определения HeatComfortAnimHandler.c:4
const float TIME_INTERVAL_HC_PLUS_HIGH_MIN
Определения HeatComfortAnimHandler.c:19
const float TIME_INTERVAL_HC_MINUS_LOW_MIN
Определения HeatComfortAnimHandler.c:15
const float TIME_INTERVAL_HC_PLUS_LOW_MAX
Определения HeatComfortAnimHandler.c:18
float GetEventTime(float hc_value, float threshold_low, float threshold_high, float low_min, float high_min, float low_max, float high_max)
Определения HeatComfortAnimHandler.c:37
const float TIME_INTERVAL_HC_PLUS_LOW_MIN
Определения HeatComfortAnimHandler.c:18
const float TIME_INTERVAL_HC_MINUS_HIGH_MIN
Определения HeatComfortAnimHandler.c:16
const float TIME_INTERVAL_HC_MINUS_LOW_MAX
Определения HeatComfortAnimHandler.c:15
void HeatComfortAnimHandler(PlayerBase player)
Определения HeatComfortAnimHandler.c:21
const float TIME_INTERVAL_HC_PLUS_HIGH_MAX
Определения HeatComfortAnimHandler.c:19
const float TICK_INTERVAL
Определения HeatComfortAnimHandler.c:3
PlayerBase m_Player
Определения HeatComfortAnimHandler.c:9
float m_EventTimeFreezeRattle
Определения HeatComfortAnimHandler.c:11
Определения human.c:1139
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
Определения PlayerConstants.c:92
static const float THRESHOLD_HEAT_COMFORT_PLUS_WARNING
Определения PlayerConstants.c:88
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
Определения PlayerConstants.c:93
static const float THRESHOLD_HEAT_COMFORT_PLUS_EMPTY
Определения PlayerConstants.c:90
static const float THRESHOLD_HEAT_COMFORT_MINUS_EMPTY
Определения PlayerConstants.c:94
Определения PlayerConstants.c:2
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].
Определения 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,...