DayZ 1.24
Loading...
Searching...
No Matches
Fever.c
Go to the documentation of this file.
2{
3 private float m_Time;
4 private float m_NextEvent;
5
6 static const float EVENT_INTERVAL_MIN = 12;
7 static const float EVENT_INTERVAL_MAX = 18;
8
9
19 {
20 return (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_CHOLERA) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_INFLUENZA) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2));
21 }
22
24 {
25 if (player.m_NotifiersManager)
26 player.m_NotifiersManager.ActivateByType(eNotifiers.NTF_FEVERISH);
27
28 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_FEVERBLUR);
29 }
30
32 {
33 this.OnActivate(player);
34 }
35
36
38 {
39 if (player.m_NotifiersManager)
40 player.m_NotifiersManager.DeactivateByType(eNotifiers.NTF_FEVERISH);
41 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_FEVERBLUR);
42 }
43
44
46 {
48 }
49
50 override void OnTick(PlayerBase player, float deltaT)
51 {
53 player.GetStatWater().Add(-water_loss);
54
55 m_Time += deltaT;
56
57 if (m_Time >= m_NextEvent)
58 {
59 m_Time = 0;
61
62 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_HOT);
63 }
64 }
65};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
eModifierSyncIDs m_SyncID
float m_TickIntervalActive
float m_TickIntervalInactive
eModifierSyncIDs
const int DEFAULT_TICK_TIME_INACTIVE
const int DEFAULT_TICK_TIME_ACTIVE_SHORT
eNotifiers
override void OnActivate(PlayerBase player)
Definition Fever.c:23
override void OnReconnect(PlayerBase player)
Definition Fever.c:31
override bool ActivateCondition(PlayerBase player)
Definition Fever.c:18
float m_NextEvent
Definition Fever.c:4
float m_Time
Definition Fever.c:3
override void OnDeactivate(PlayerBase player)
Definition Fever.c:37
override bool DeactivateCondition(PlayerBase player)
Definition Fever.c:45
static const float EVENT_INTERVAL_MIN
Definition Fever.c:6
static const float EVENT_INTERVAL_MAX
Definition Fever.c:7
override void Init()
Definition Fever.c:10
override void OnTick(PlayerBase player, float deltaT)
Definition Fever.c:50
Definition EnMath.c:7
static const float WATER_LOSS_FEVER
eModifiers
Definition eModifiers.c:2
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167