Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
staminahandler.c File Reference

Go to the source code of this file.

Data Structures

class  StaminaConsumers
 
class  StaminaModifierExponential
 
class  StaminaHandler
 

Enumerations

enum  EStaminaMultiplierTypes
 

Functions

void StaminaConsumer (float threshold, float threshold2, bool state)
 
bool GetState ()
 returns one of STATE_... More...
 
void SetState (bool state)
 
float GetActivationThreshold ()
 
void SetActivationThreshold (float threshold)
 
float GetDrainThreshold ()
 
void SetDrainThreshold (float threshold)
 
void StaminaConsumers ()
 
void RegisterConsumer (EStaminaConsumers consumer, float threshold, float depletion_threshold=-1)
 
bool HasEnoughStaminaFor (EStaminaConsumers consumer, float curStamina, bool isDepleted, float cap)
 
bool HasEnoughStaminaToStart (EStaminaConsumers consumer, float curStamina, bool isDepleted, float cap)
 
void StaminaModifier (int type, float min, float max, float cooldown, float startTime=0, float duration=0)
 
int GetType ()
 
float GetMinValue ()
 
void SetMinValue (float val)
 
float GetMaxValue ()
 
void SetMaxValue (float val)
 
float GetCooldown ()
 
void SetCooldown (float val)
 
float GetStartTime ()
 
void SetStartTime (float val)
 
float GetStartTimeAdjustment ()
 
float GetDuration ()
 
float GetDurationAdjusted ()
 
bool IsInUse ()
 
void SetInUse (bool val)
 
float GetRunTime ()
 
void AddRunTime (float val)
 
void SetRunTimeTick (float val)
 
void ResetRunTime ()
 
void StaminaModifiers ()
 
void RegisterFixed (EStaminaModifiers modifier, float value, float cooldown=GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION)
 register single value modifier - depletes stamina for that value More...
 
void RegisterRandomized (EStaminaModifiers modifier, float minValue, float maxValue, float cooldown=GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION)
 register randomized modifier - stamina will be depleted by value between min and max value; More...
 
void RegisterLinear (EStaminaModifiers modifier, float startValue, float endValue, float startTime, float duration, float cooldown=GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION)
 register lerped modifier - depletes stamina for startValue, and, after a startTime, lerps to endValue over duration More...
 
void RegisterExponential (EStaminaModifiers modifier, float startValue, float exponent, float startTime, float duration, float cooldown=GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION)
 register exponential modifier - depletes stamina for startValue, and, after a startTime, lerps from 0 to exponent over duration More...
 
void RegisterExponentialEx (EStaminaModifiers modifier, SMDataExponential data)
 register exponential modifier, extended parameters More...
 
StaminaModifier GetModifierData (EStaminaModifiers modifier)
 

Variables

 MASK = 1
 
 FATIGUE
 
 EPINEPHRINE
 
 DROWNING
 
 m_ActivationThreshold
 
protected float m_DrainThreshold protected bool m_State
 
protected ref map< EStaminaConsumers, ref StaminaConsumerm_StaminaConsumers
 
 m_InUse = false
 
int m_Type
 
float m_MinValue
 
float m_MaxValue
 
float m_Multiplier
 
float m_Cooldown
 
float m_StartTime
 
float m_StartTimeAdjustment
 
float m_Duration
 
float m_ProgressTime
 
float m_Tick
 
StaminaModifierExponential FIXED = 0
 
const int RANDOMIZED = 1
 
const int LINEAR = 2
 
const int EXPONENTIAL = 3
 
protected ref map< EStaminaModifiers, ref StaminaModifierm_StaminaModifiers
 

Enumeration Type Documentation

◆ EStaminaMultiplierTypes

Definition at line 1 of file staminahandler.c.

Function Documentation

◆ AddRunTime()

void AddRunTime ( float  val)

Definition at line 175 of file staminahandler.c.

◆ GetActivationThreshold()

float GetActivationThreshold ( )

Definition at line 32 of file staminahandler.c.

◆ GetCooldown()

float GetCooldown ( )

Definition at line 160 of file staminahandler.c.

◆ GetDrainThreshold()

float GetDrainThreshold ( )

Definition at line 35 of file staminahandler.c.

◆ GetDuration()

float GetDuration ( )

Definition at line 168 of file staminahandler.c.

◆ GetDurationAdjusted()

float GetDurationAdjusted ( )

Definition at line 169 of file staminahandler.c.

◆ GetMaxValue()

float GetMaxValue ( )

Definition at line 157 of file staminahandler.c.

◆ GetMinValue()

float GetMinValue ( )

Definition at line 154 of file staminahandler.c.

◆ GetModifierData()

StaminaModifier GetModifierData ( EStaminaModifiers  modifier)

Definition at line 253 of file staminahandler.c.

◆ GetRunTime()

float GetRunTime ( )

Definition at line 174 of file staminahandler.c.

◆ GetStartTime()

float GetStartTime ( )

Definition at line 163 of file staminahandler.c.

◆ GetStartTimeAdjustment()

float GetStartTimeAdjustment ( )

Definition at line 166 of file staminahandler.c.

◆ GetState()

bool GetState ( )

returns one of STATE_...

returns the state of climb (enum value of ClimbStates);

Definition at line 29 of file staminahandler.c.

◆ GetType()

int GetType ( )

Definition at line 152 of file staminahandler.c.

◆ HasEnoughStaminaFor()

bool Stamina::HasEnoughStaminaFor ( EStaminaConsumers  consumer,
float  curStamina,
bool  isDepleted,
float  cap 
)

Definition at line 150 of file staminahandler.c.

◆ HasEnoughStaminaToStart()

bool Stamina::HasEnoughStaminaToStart ( EStaminaConsumers  consumer,
float  curStamina,
bool  isDepleted,
float  cap 
)

Definition at line 191 of file staminahandler.c.

◆ IsInUse()

bool IsInUse ( )

Definition at line 171 of file staminahandler.c.

◆ RegisterConsumer()

void Stamina::RegisterConsumer ( EStaminaConsumers  consumer,
float  threshold,
float  depletion_threshold = -1 
)

init of StaminaConsumer - threshold, state

Definition at line 135 of file staminahandler.c.

◆ RegisterExponential()

void RegisterExponential ( EStaminaModifiers  modifier,
float  startValue,
float  exponent,
float  startTime,
float  duration,
float  cooldown = GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION 
)

register exponential modifier - depletes stamina for startValue, and, after a startTime, lerps from 0 to exponent over duration

Definition at line 239 of file staminahandler.c.

◆ RegisterExponentialEx()

void RegisterExponentialEx ( EStaminaModifiers  modifier,
SMDataExponential  data 
)

register exponential modifier, extended parameters

Definition at line 246 of file staminahandler.c.

◆ RegisterFixed()

void RegisterFixed ( EStaminaModifiers  modifier,
float  value,
float  cooldown = GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION 
)

register single value modifier - depletes stamina for that value

init of StaminaModifier - type and min, max values (min is not relevant for that type)

Definition at line 210 of file staminahandler.c.

◆ RegisterLinear()

void RegisterLinear ( EStaminaModifiers  modifier,
float  startValue,
float  endValue,
float  startTime,
float  duration,
float  cooldown = GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION 
)

register lerped modifier - depletes stamina for startValue, and, after a startTime, lerps to endValue over duration

Definition at line 232 of file staminahandler.c.

◆ RegisterRandomized()

void RegisterRandomized ( EStaminaModifiers  modifier,
float  minValue,
float  maxValue,
float  cooldown = GameConstants.STAMINA_REGEN_COOLDOWN_DEPLETION 
)

register randomized modifier - stamina will be depleted by value between min and max value;

init of StaminaModifier - type, min, max values

Definition at line 221 of file staminahandler.c.

◆ ResetRunTime()

void ResetRunTime ( )

Definition at line 177 of file staminahandler.c.

◆ SetActivationThreshold()

void SetActivationThreshold ( float  threshold)

Definition at line 33 of file staminahandler.c.

◆ SetCooldown()

void SetCooldown ( float  val)

Definition at line 161 of file staminahandler.c.

◆ SetDrainThreshold()

void SetDrainThreshold ( float  threshold)

Definition at line 36 of file staminahandler.c.

◆ SetInUse()

void SetInUse ( bool  val)

Definition at line 172 of file staminahandler.c.

◆ SetMaxValue()

void SetMaxValue ( float  val)

Definition at line 158 of file staminahandler.c.

◆ SetMinValue()

void SetMinValue ( float  val)

Definition at line 155 of file staminahandler.c.

◆ SetRunTimeTick()

void SetRunTimeTick ( float  val)

Definition at line 176 of file staminahandler.c.

◆ SetStartTime()

void SetStartTime ( float  val)

Definition at line 164 of file staminahandler.c.

◆ SetState()

void SetState ( bool  state)

Definition at line 30 of file staminahandler.c.

◆ StaminaConsumer()

void StaminaConsumer ( float  threshold,
float  threshold2,
bool  state 
)

Definition at line 22 of file staminahandler.c.

◆ StaminaConsumers()

void Stamina::StaminaConsumers ( )

Definition at line 130 of file staminahandler.c.

◆ StaminaModifier()

void StaminaModifier ( int  type,
float  min,
float  max,
float  cooldown,
float  startTime = 0,
float  duration = 0 
)

Definition at line 141 of file staminahandler.c.

◆ StaminaModifiers()

void StaminaModifiers ( )

Definition at line 204 of file staminahandler.c.

Variable Documentation

◆ DROWNING

@ DROWNING

Definition at line 14 of file staminahandler.c.

◆ EPINEPHRINE

EPINEPHRINE

Definition at line 13 of file staminahandler.c.

◆ EXPONENTIAL

const int EXPONENTIAL = 3

Definition at line 200 of file staminahandler.c.

◆ FATIGUE

FATIGUE

Definition at line 12 of file staminahandler.c.

◆ FIXED

◆ LINEAR

const int LINEAR = 2

Definition at line 199 of file staminahandler.c.

◆ m_ActivationThreshold

m_ActivationThreshold

◆ m_Cooldown

float m_Cooldown

Definition at line 139 of file staminahandler.c.

◆ m_Duration

float m_Duration

Definition at line 139 of file staminahandler.c.

◆ m_InUse

m_InUse = false

◆ m_MaxValue

float m_MaxValue

Definition at line 139 of file staminahandler.c.

◆ m_MinValue

float m_MinValue

Definition at line 139 of file staminahandler.c.

◆ m_Multiplier

float m_Multiplier

Definition at line 139 of file staminahandler.c.

◆ m_ProgressTime

float m_ProgressTime

Definition at line 139 of file staminahandler.c.

◆ m_StaminaConsumers

protected ref map<EStaminaConsumers, ref StaminaConsumer> m_StaminaConsumers

Definition at line 128 of file staminahandler.c.

◆ m_StaminaModifiers

protected ref map<EStaminaModifiers, ref StaminaModifier> m_StaminaModifiers

Definition at line 202 of file staminahandler.c.

◆ m_StartTime

float m_StartTime

Definition at line 139 of file staminahandler.c.

◆ m_StartTimeAdjustment

float m_StartTimeAdjustment

Definition at line 139 of file staminahandler.c.

◆ m_State

protected float m_DrainThreshold protected bool m_State

Definition at line 20 of file staminahandler.c.

◆ m_Tick

float m_Tick

Definition at line 139 of file staminahandler.c.

◆ m_Type

int m_Type

Definition at line 138 of file staminahandler.c.

◆ MASK

MASK = 1

Definition at line 11 of file staminahandler.c.

◆ RANDOMIZED

const int RANDOMIZED = 1

Definition at line 198 of file staminahandler.c.