DayZ 1.24
Loading...
Searching...
No Matches
HeatComfortMdfr Class Reference
Inheritance diagram for HeatComfortMdfr:
[legend]
Collaboration diagram for HeatComfortMdfr:
[legend]

Private Member Functions

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnReconnect (PlayerBase player)
 
override string GetDebugText ()
 
override string GetDebugTextSimple ()
 
override void OnTick (PlayerBase player, float deltaT)
 

Detailed Description

Definition at line 1 of file HeatComfortMdfr.c.

Member Function Documentation

◆ ActivateCondition()

override bool HeatComfortMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 12 of file HeatComfortMdfr.c.

13 {
14 return true;
15 }

◆ DeactivateCondition()

override bool HeatComfortMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 17 of file HeatComfortMdfr.c.

18 {
19 return false;
20 }

◆ GetDebugText()

override string HeatComfortMdfr::GetDebugText ( )
inlineprivate

Definition at line 27 of file HeatComfortMdfr.c.

28 {
29 return m_Player.GetStatHeatComfort().Get().ToString();
30 }
DayZPlayer m_Player
Definition Hand_Events.c:42

References m_Player.

◆ GetDebugTextSimple()

override string HeatComfortMdfr::GetDebugTextSimple ( )
inlineprivate

Definition at line 32 of file HeatComfortMdfr.c.

33 {
34 return m_Player.GetStatHeatComfort().Get().ToString();
35 }

References m_Player.

◆ Init()

override void HeatComfortMdfr::Init ( )
inlineprivate

Definition at line 3 of file HeatComfortMdfr.c.

4 {
6 m_ID = eModifiers.MDF_TEMPERATURE;
10 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableDeactivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

References DEFAULT_TICK_TIME_ACTIVE, DEFAULT_TICK_TIME_INACTIVE, DisableDeactivateCheck(), m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnReconnect()

override void HeatComfortMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 22 of file HeatComfortMdfr.c.

23 {
24
25 }

◆ OnTick()

override void HeatComfortMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprivate

Definition at line 38 of file HeatComfortMdfr.c.

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 }
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
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,...

References Math::Clamp(), PlayerConstants::ENERGY_LOSS_HC_MINUS_HIGH, PlayerConstants::ENERGY_LOSS_HC_MINUS_LOW, PlayerConstants::ENERGY_LOSS_THRESHOLD_HC_MINUS_HIGH, PlayerConstants::ENERGY_LOSS_THRESHOLD_HC_MINUS_LOW, PlayerConstants::HEALTH_LOSS_HC_MINUS_HIGH, PlayerConstants::HEALTH_LOSS_HC_MINUS_LOW, PlayerConstants::HEALTH_LOSS_HC_PLUS_HIGH, PlayerConstants::HEALTH_LOSS_HC_PLUS_LOW, Math::InverseLerp(), Math::Lerp(), PlayerConstants::WATER_LOSS_HC_PLUS_HIGH, PlayerConstants::WATER_LOSS_HC_PLUS_LOW, PlayerConstants::WATER_LOSS_THRESHOLD_HC_PLUS_HIGH, and PlayerConstants::WATER_LOSS_THRESHOLD_HC_PLUS_LOW.


The documentation for this class was generated from the following file: