DayZ 1.24
Loading...
Searching...
No Matches
BreathVapourMdfr.c
Go to the documentation of this file.
2
4{
5 override void Init()
6 {
8 m_ID = eModifiers.MDF_BREATH_VAPOUR;
12
13 }
14
16 {
17 return true;
18 }
19
21 {
22 return false;
23 }
24
26 {
27
28 }
29
30 override string GetDebugText()
31 {
32 //return m_Player.GetStatHeatComfort().Get().ToString();
33 }
34
35 override string GetDebugTextSimple()
36 {
37 //return m_Player.GetStatHeatComfort().Get().ToString();
38 }
39
40
41 override void OnTick(PlayerBase player, float deltaT)
42 {
43 if (!player.m_Environment.IsTemperatureSet())
44 return;
45 float air_temperature = player.m_Environment.GetTemperature();
46 int level = 0;//default
48 {
50 value = Math.Clamp(value, 0, 1);
52 }
55 if (level != player.m_BreathVapour)
56 {
57 player.m_BreathVapour = level;
58 player.SetSynchDirty();
59 }
60 }
61};
const int BREATH_VAPOUR_LEVEL_MAX
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
Definition EnMath.c:7
override void OnReconnect(PlayerBase player)
override bool DeactivateCondition(PlayerBase player)
override string GetDebugText()
override string GetDebugTextSimple()
override void Init()
override bool ActivateCondition(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
static const float BREATH_VAPOUR_THRESHOLD_LOW
static const float BREATH_VAPOUR_THRESHOLD_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 Round(float f)
Returns mathematical round of value.
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,...