DayZ 1.24
Loading...
Searching...
No Matches
Fatigue.c
Go to the documentation of this file.
2{
3 private float m_Time;
4 private float m_NextEvent;
5
6 static const float FATIGUE_EVENT_INTERVAL_MIN = 5;
7 static const float FATIGUE_EVENT_INTERVAL_MAX = 12;
8 static const float STAMINA_RECOVERY_MULTIPLIER = 0.33;
9 static const float STAMINA_DEPLETION_MULTIPLIER = 1.33;
10
18
20 {
21 return (player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION1) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_POISONING) || player.GetModifiersManager().IsModifierActive(eModifiers.MDF_WOUND_INFECTION2));
22 }
23
25 {
26 if (player.m_NotifiersManager)
27 player.m_NotifiersManager.ActivateByType(eNotifiers.NTF_FEVERISH);
28
29
30 player.GetStaminaHandler().ActivateRecoveryModifier(EStaminaMultiplierTypes.FATIGUE);
31 player.GetStaminaHandler().ActivateDepletionModifier(EStaminaMultiplierTypes.FATIGUE);
32
33 }
34
36 {
37 this.OnActivate(player);
38 }
39
40
42 {
43 //player.GetStaminaHandler().SetDepletionMultiplier(1);
44 player.GetStaminaHandler().DeactivateRecoveryModifier(EStaminaMultiplierTypes.FATIGUE);
45 player.GetStaminaHandler().DeactivateDepletionModifier(EStaminaMultiplierTypes.FATIGUE);
46 }
47
48
50 {
52 }
53
54 override void OnTick(PlayerBase player, float deltaT)
55 {
56
57 }
58};
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
const int DEFAULT_TICK_TIME_ACTIVE
const int DEFAULT_TICK_TIME_INACTIVE_LONG
eNotifiers
EStaminaMultiplierTypes
override void OnActivate(PlayerBase player)
Definition Fatigue.c:24
static const float FATIGUE_EVENT_INTERVAL_MIN
Definition Fatigue.c:6
static const float FATIGUE_EVENT_INTERVAL_MAX
Definition Fatigue.c:7
float m_NextEvent
Definition Fatigue.c:4
static const float STAMINA_DEPLETION_MULTIPLIER
Definition Fatigue.c:9
override bool DeactivateCondition(PlayerBase player)
Definition Fatigue.c:49
override void OnDeactivate(PlayerBase player)
Definition Fatigue.c:41
override void Init()
Definition Fatigue.c:11
float m_Time
Definition Fatigue.c:3
override void OnTick(PlayerBase player, float deltaT)
Definition Fatigue.c:54
override void OnReconnect(PlayerBase player)
Definition Fatigue.c:35
static const float STAMINA_RECOVERY_MULTIPLIER
Definition Fatigue.c:8
override bool ActivateCondition(PlayerBase player)
Definition Fatigue.c:19
eModifiers
Definition eModifiers.c:2
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167