DayZ 1.24
Loading...
Searching...
No Matches
HeatComfortMdfr.c
Go to the documentation of this file.
2{
11
13 {
14 return true;
15 }
16
18 {
19 return false;
20 }
21
23 {
24
25 }
26
27 override string GetDebugText()
28 {
29 return m_Player.GetStatHeatComfort().Get().ToString();
30 }
31
32 override string GetDebugTextSimple()
33 {
34 return m_Player.GetStatHeatComfort().Get().ToString();
35 }
36
37
38 override void OnTick(PlayerBase player, float deltaT)
39 {
40 float heat_comfort = player.GetStatHeatComfort().Get();
41 float health_loss;
42 float value_normalized;
43
45 {
49 player.GetStatWater().Add(-water_loss);
50
52 {
56 }
57 }
59 {
63 player.GetStatEnergy().Add(-energy_loss);
64
66 {
70 }
71 }
72
73 if (health_loss != 0)
74 player.AddHealth("", "", -health_loss);
75 }
76};
77
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
DayZPlayer m_Player
Definition Hand_Events.c:42
bool m_TrackActivatedTime
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
override string GetDebugTextSimple()
override void OnTick(PlayerBase player, float deltaT)
override bool ActivateCondition(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
override string GetDebugText()
override void OnReconnect(PlayerBase player)
override void Init()
Definition EnMath.c:7
static const float ENERGY_LOSS_HC_MINUS_HIGH
static const float WATER_LOSS_HC_PLUS_HIGH
static const float ENERGY_LOSS_THRESHOLD_HC_MINUS_HIGH
static const float ENERGY_LOSS_THRESHOLD_HC_MINUS_LOW
static const float HEALTH_LOSS_HC_MINUS_HIGH
static const float WATER_LOSS_THRESHOLD_HC_PLUS_HIGH
static const float HEALTH_LOSS_HC_MINUS_LOW
static const float HEALTH_LOSS_HC_PLUS_LOW
static const float ENERGY_LOSS_HC_MINUS_LOW
static const float WATER_LOSS_HC_PLUS_LOW
static const float WATER_LOSS_THRESHOLD_HC_PLUS_LOW
static const float HEALTH_LOSS_HC_PLUS_HIGH
eModifiers
Definition eModifiers.c:2
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...