DayZ 1.24
|
Definition at line 258 of file StaminaHandler.c.
|
inlineprotected |
Definition at line 293 of file StaminaHandler.c.
References GetGame(), CfgGameplayHandler::GetStaminaMax(), Init(), m_ActiveDepletionModifiers, m_ActiveRecoveryModifiers, m_HumanMoveSettings, m_IsInCooldown, m_Player, m_RegisteredDepletionModifiers, m_RegisteredRecoveryModifiers, m_Stamina, m_StaminaCap, m_StaminaDepleted, m_StaminaDepletion, m_StaminaDepletionMultiplier, m_StaminaParams, m_StaminaRecoveryMultiplier, m_State, m_Time, m_TimerMap, RegisterStaminaConsumers(), and RegisterStaminaModifiers().
|
inlineprotected |
Definition at line 341 of file StaminaHandler.c.
References Error(), m_ActiveDepletionModifiers, m_RegisteredDepletionModifiers, and RecalculateDepletionMultiplier().
|
inlineprotected |
Definition at line 373 of file StaminaHandler.c.
References Error(), m_ActiveRecoveryModifiers, m_RegisteredRecoveryModifiers, and RecalculateRecoveryMultiplier().
|
inlineprotected |
sets exhaustion look of player based on stamina level
Definition at line 755 of file StaminaHandler.c.
References HumanCommandAdditives(), m_Player, m_Stamina, m_StaminaCap, and Math::Min().
Referenced by Update().
|
inlineprotected |
Calulates stamina regain bonus coef based on current stamina cap and level.
Definition at line 744 of file StaminaHandler.c.
References m_Stamina, m_StaminaDepletion, Math::Min(), and GameConstants::STAMINA_GAIN_BONUS_CAP.
Referenced by StaminaProcessor_Ladder(), StaminaProcessor_Move(), and StaminaProcessor_Swimming().
|
inlineprotected |
check if the stamina is completely depleted
in case of complete depletion - start a cooldown timer before the regeneration cycle start
Definition at line 776 of file StaminaHandler.c.
References m_IsInCooldown, m_Stamina, m_StaminaDepleted, SetCooldown(), and GameConstants::STAMINA_REGEN_COOLDOWN_EXHAUSTION.
Referenced by Update().
|
inlineprotected |
Definition at line 352 of file StaminaHandler.c.
References m_ActiveDepletionModifiers, and RecalculateDepletionMultiplier().
|
inlineprotected |
Definition at line 385 of file StaminaHandler.c.
References m_ActiveRecoveryModifiers, and RecalculateRecoveryMultiplier().
|
inlineprotected |
run cooldown right after depletion
Definition at line 908 of file StaminaHandler.c.
References Math::AbsFloat(), Class::CastTo(), Math::Clamp(), ErrorEx, CfgGameplayHandler::GetStaminaMax(), Math::Lerp(), m_Player, m_StaminaDepletion, m_StaminaDepletionMultiplier, m_StaminaModifiers, Math::Max(), Math::Min(), Math::Pow(), Math::RandomFloat(), and SetCooldown().
Definition at line 829 of file StaminaHandler.c.
|
inlineprotected |
Definition at line 898 of file StaminaHandler.c.
References m_StaminaDepletionMultiplier.
|
inlineprotected |
Definition at line 903 of file StaminaHandler.c.
References m_StaminaRecoveryMultiplier.
|
inlineprotected |
Definition at line 851 of file StaminaHandler.c.
References m_Stamina.
|
inlineprotected |
Definition at line 871 of file StaminaHandler.c.
References m_StaminaCap.
|
inlineprotected |
Definition at line 876 of file StaminaHandler.c.
References CfgGameplayHandler::GetStaminaMax().
Referenced by GetStaminaNormalized(), and GetSyncedStaminaNormalized().
|
inlineprotected |
Definition at line 856 of file StaminaHandler.c.
References GetStaminaMax(), and m_Stamina.
|
inlineprotected |
Definition at line 861 of file StaminaHandler.c.
References m_StaminaSynced.
Referenced by GetSyncedStaminaNormalized().
|
inlineprotected |
Definition at line 866 of file StaminaHandler.c.
References GetStaminaMax(), and GetSyncedStamina().
|
inlineprotected |
Definition at line 835 of file StaminaHandler.c.
References m_Stamina, m_StaminaCap, m_StaminaConsumers, and m_StaminaDepleted.
|
inlineprotected |
Definition at line 840 of file StaminaHandler.c.
References m_Stamina, m_StaminaCap, m_StaminaConsumers, and m_StaminaDepleted.
|
inlineprotected |
Definition at line 327 of file StaminaHandler.c.
References m_RegisteredDepletionModifiers, m_RegisteredRecoveryModifiers, MaskMdfr::STAMINA_DEPLETION_MODIFIER, FatigueMdfr::STAMINA_DEPLETION_MULTIPLIER, EpinephrineMdfr::STAMINA_DEPLETION_MULTIPLIER, MaskMdfr::STAMINA_RECOVERY_MODIFIER, FatigueMdfr::STAMINA_RECOVERY_MULTIPLIER, and DrowningMdfr::STAMINA_RECOVERY_MULTIPLIER.
Referenced by StaminaHandler().
deprecated use, StaminaHandler uses SyncJunctures now
Definition at line 487 of file StaminaHandler.c.
|
inlineprotected |
called from PlayerBase - syncs stamina values on server with client AND sets the value to match on server and client both (m_StaminaSynced guarantees identical values)
Definition at line 492 of file StaminaHandler.c.
References m_IsInCooldown, m_Player, m_Stamina, m_StaminaCap, m_StaminaSynced, ReadAdditionalStaminaInfo(), DayZPlayerSyncJunctures::SJ_STAMINA, and DayZPlayerSyncJunctures::SJ_STAMINA_MISC.
Referenced by ManBase::OnSyncJuncture().
|
inlineprotected |
Order of read parameters must match the order of writing above.
Definition at line 644 of file StaminaHandler.c.
References m_StaminaDepletionMultiplier, and m_StaminaRecoveryMultiplier.
Referenced by OnSyncJuncture().
|
inlineprotected |
Definition at line 362 of file StaminaHandler.c.
References m_ActiveDepletionModifiers, m_RegisteredDepletionModifiers, m_StaminaDepletionMultiplier, and SetDepletionMultiplier().
Referenced by ActivateDepletionModifier(), and DeactivateDepletionModifier().
|
inlineprotected |
Definition at line 395 of file StaminaHandler.c.
References m_ActiveRecoveryModifiers, m_RegisteredRecoveryModifiers, m_StaminaRecoveryMultiplier, and SetRecoveryMultiplier().
Referenced by ActivateRecoveryModifier(), and DeactivateRecoveryModifier().
|
inlineprotected |
Definition at line 655 of file StaminaHandler.c.
References CfgGameplayHandler::GetStaminaMinCap(), m_StaminaConsumers, GameConstants::STAMINA_CLIMB_THRESHOLD, GameConstants::STAMINA_HOLD_BREATH_THRESHOLD_ACTIVATE, GameConstants::STAMINA_HOLD_BREATH_THRESHOLD_DRAIN, GameConstants::STAMINA_JUMP_THRESHOLD, GameConstants::STAMINA_MELEE_EVADE_THRESHOLD, GameConstants::STAMINA_MELEE_HEAVY_THRESHOLD, GameConstants::STAMINA_ROLL_THRESHOLD, GameConstants::STAMINA_VAULT_THRESHOLD, and StaminaConsumers().
Referenced by StaminaHandler().
|
inlineprotected |
Definition at line 696 of file StaminaHandler.c.
References CfgGameplayHandler::GetMeleeStaminaModifier(), CfgGameplayHandler::GetObstacleTraversalStaminaModifier(), CfgGameplayHandler::GetStaminaMax(), m_StaminaModifiers, GameConstants::STAMINA_DRAIN_CLIMB, GameConstants::STAMINA_DRAIN_JUMP, GameConstants::STAMINA_DRAIN_MELEE_EVADE, GameConstants::STAMINA_DRAIN_MELEE_HEAVY, GameConstants::STAMINA_DRAIN_MELEE_LIGHT, GameConstants::STAMINA_DRAIN_ROLL, GameConstants::STAMINA_DRAIN_VAULT, and StaminaModifiers().
Referenced by StaminaHandler().
Definition at line 815 of file StaminaHandler.c.
References m_IsInCooldown, and m_StaminaModifiers.
Referenced by SetCooldown().
set cooldown timer between each consume of stamina
Definition at line 793 of file StaminaHandler.c.
References m_IsInCooldown, m_Stamina, m_StaminaDepleted, m_TimerMap, and ResetCooldown().
Referenced by CheckStaminaState(), DepleteStamina(), StaminaProcessor_Ladder(), StaminaProcessor_Move(), and StaminaProcessor_Swimming().
Definition at line 882 of file StaminaHandler.c.
References m_StaminaDepletionMultiplier, m_StaminaRecoveryMultiplier, and SyncAdditionalStaminaInfo().
Referenced by RecalculateDepletionMultiplier().
Definition at line 890 of file StaminaHandler.c.
References m_StaminaDepletionMultiplier, m_StaminaRecoveryMultiplier, and SyncAdditionalStaminaInfo().
Referenced by RecalculateRecoveryMultiplier().
Definition at line 845 of file StaminaHandler.c.
References Math::Clamp(), CfgGameplayHandler::GetStaminaMax(), m_IsInCooldown, m_Stamina, m_StaminaCap, and SyncStamina().
Referenced by ManBase::EEHitBy(), ManBase::ResetPlayer(), and Update().
|
inlineprotected |
Definition at line 578 of file StaminaHandler.c.
References CalcStaminaGainBonus(), CfgGameplayHandler::GetSprintLadderStaminaModifier(), m_IsInCooldown, m_StaminaDelta, SetCooldown(), GameConstants::STAMINA_DRAIN_LADDER_FAST_PER_SEC, GameConstants::STAMINA_GAIN_IDLE_PER_SEC, GameConstants::STAMINA_GAIN_LADDER_PER_SEC, and GameConstants::STAMINA_REGEN_COOLDOWN_DEPLETION.
Referenced by Update().
|
inlineprotected |
Definition at line 523 of file StaminaHandler.c.
References CalcStaminaGainBonus(), CfgGameplayHandler::GetSprintStaminaModifierCro(), CfgGameplayHandler::GetSprintStaminaModifierErc(), m_HumanMoveSettings, m_IsInCooldown, m_Player, m_StaminaDelta, SetCooldown(), GameConstants::STAMINA_DRAIN_CROUCHED_SPRINT_PER_SEC, GameConstants::STAMINA_DRAIN_STANDING_SPRINT_PER_SEC, GameConstants::STAMINA_GAIN_IDLE_PER_SEC, GameConstants::STAMINA_GAIN_JOG_PER_SEC, GameConstants::STAMINA_GAIN_ROLL_PER_SEC, GameConstants::STAMINA_GAIN_WALK_PER_SEC, and GameConstants::STAMINA_REGEN_COOLDOWN_DEPLETION.
Referenced by Update().
|
inlineprotected |
Definition at line 599 of file StaminaHandler.c.
References CalcStaminaGainBonus(), CfgGameplayHandler::GetSprintSwimmingStaminaModifier(), m_IsInCooldown, m_StaminaDelta, SetCooldown(), GameConstants::STAMINA_DRAIN_SWIM_FAST_PER_SEC, GameConstants::STAMINA_GAIN_IDLE_PER_SEC, GameConstants::STAMINA_GAIN_SWIM_PER_SEC, and GameConstants::STAMINA_REGEN_COOLDOWN_DEPLETION.
Referenced by Update().
Method to sync more info for stamina manager. Template parameter means it is very extendable for further use.
Definition at line 633 of file StaminaHandler.c.
References m_Player, and DayZPlayerSyncJunctures::SJ_STAMINA_MISC.
Referenced by SetDepletionMultiplier(), and SetRecoveryMultiplier().
|
inlineprotected |
stamina sync - server part
Definition at line 622 of file StaminaHandler.c.
References m_IsInCooldown, m_Player, m_Stamina, m_StaminaCap, and DayZPlayerSyncJunctures::SJ_STAMINA.
Referenced by SetStamina().
gets the actual players load
StaminaCap calculation starts when PlayerLoad exceeds STAMINA_WEIGHT_LIMIT_THRESHOLD
processed on event
processed on event
processed on event
Definition at line 406 of file StaminaHandler.c.
References ApplyExhaustion(), CheckStaminaState(), GetGame(), CfgGameplayHandler::GetStaminaKgToStaminaPercentPenalty(), CfgGameplayHandler::GetStaminaMax(), CfgGameplayHandler::GetStaminaMinCap(), CfgGameplayHandler::GetStaminaWeightLimitThreshold(), m_IsInCooldown, m_Player, m_PlayerLoad, m_Stamina, m_StaminaCap, m_StaminaDelta, m_StaminaDepletion, m_StaminaDepletionMultiplier, m_StaminaRecoveryMultiplier, m_StaminaSynced, m_State, m_Time, Math::Max(), Math::Min(), SetStamina(), GameConstants::STAMINA_GAIN_IDLE_PER_SEC, GameConstants::STAMINA_KG_TO_GRAMS, GameConstants::STAMINA_SYNC_RATE, StaminaProcessor_Ladder(), StaminaProcessor_Move(), and StaminaProcessor_Swimming().
Referenced by ManBase::CommandHandler().
|
protected |
Definition at line 279 of file StaminaHandler.c.
Referenced by ActivateDepletionModifier(), DeactivateDepletionModifier(), RecalculateDepletionMultiplier(), and StaminaHandler().
|
protected |
Definition at line 282 of file StaminaHandler.c.
Referenced by ActivateRecoveryModifier(), DeactivateRecoveryModifier(), RecalculateRecoveryMultiplier(), and StaminaHandler().
|
protected |
Definition at line 274 of file StaminaHandler.c.
|
protected |
Definition at line 271 of file StaminaHandler.c.
Referenced by StaminaHandler(), and StaminaProcessor_Move().
|
protected |
Definition at line 284 of file StaminaHandler.c.
Referenced by CheckStaminaState(), OnSyncJuncture(), ResetCooldown(), SetCooldown(), SetStamina(), StaminaHandler(), StaminaProcessor_Ladder(), StaminaProcessor_Move(), StaminaProcessor_Swimming(), SyncStamina(), and Update().
|
protected |
Definition at line 272 of file StaminaHandler.c.
Referenced by ApplyExhaustion(), DepleteStamina(), OnSyncJuncture(), StaminaHandler(), StaminaProcessor_Move(), SyncAdditionalStaminaInfo(), SyncStamina(), and Update().
|
protected |
Definition at line 260 of file StaminaHandler.c.
Referenced by Update().
|
protected |
Definition at line 278 of file StaminaHandler.c.
Referenced by ActivateDepletionModifier(), Init(), RecalculateDepletionMultiplier(), and StaminaHandler().
|
protected |
Definition at line 281 of file StaminaHandler.c.
Referenced by ActivateRecoveryModifier(), Init(), RecalculateRecoveryMultiplier(), and StaminaHandler().
|
protected |
Definition at line 262 of file StaminaHandler.c.
Referenced by ApplyExhaustion(), CalcStaminaGainBonus(), CheckStaminaState(), GetStamina(), GetStaminaNormalized(), HasEnoughStaminaFor(), HasEnoughStaminaToStart(), OnSyncJuncture(), SetCooldown(), SetStamina(), StaminaHandler(), SyncStamina(), and Update().
|
protected |
Definition at line 264 of file StaminaHandler.c.
Referenced by ApplyExhaustion(), GetStaminaCap(), HasEnoughStaminaFor(), HasEnoughStaminaToStart(), OnSyncJuncture(), SetStamina(), StaminaHandler(), SyncStamina(), and Update().
|
protected |
Definition at line 286 of file StaminaHandler.c.
Referenced by HasEnoughStaminaFor(), HasEnoughStaminaToStart(), and RegisterStaminaConsumers().
|
protected |
Definition at line 261 of file StaminaHandler.c.
Referenced by StaminaProcessor_Ladder(), StaminaProcessor_Move(), StaminaProcessor_Swimming(), and Update().
|
protected |
DEPRECATED.
Definition at line 275 of file StaminaHandler.c.
Referenced by CheckStaminaState(), HasEnoughStaminaFor(), HasEnoughStaminaToStart(), SetCooldown(), and StaminaHandler().
|
protected |
Definition at line 265 of file StaminaHandler.c.
Referenced by CalcStaminaGainBonus(), DepleteStamina(), StaminaHandler(), and Update().
|
protected |
Definition at line 266 of file StaminaHandler.c.
Referenced by DepleteStamina(), GetDepletionMultiplier(), ReadAdditionalStaminaInfo(), RecalculateDepletionMultiplier(), SetDepletionMultiplier(), SetRecoveryMultiplier(), StaminaHandler(), and Update().
|
protected |
Definition at line 287 of file StaminaHandler.c.
Referenced by DepleteStamina(), RegisterStaminaModifiers(), and ResetCooldown().
Definition at line 269 of file StaminaHandler.c.
Referenced by StaminaHandler().
|
protected |
Definition at line 267 of file StaminaHandler.c.
Referenced by GetRecoveryMultiplier(), ReadAdditionalStaminaInfo(), RecalculateRecoveryMultiplier(), SetDepletionMultiplier(), SetRecoveryMultiplier(), StaminaHandler(), and Update().
|
protected |
Definition at line 263 of file StaminaHandler.c.
Referenced by GetSyncedStamina(), OnSyncJuncture(), and Update().
|
protected |
Definition at line 270 of file StaminaHandler.c.
Referenced by StaminaHandler(), and Update().
|
protected |
Definition at line 268 of file StaminaHandler.c.
Referenced by StaminaHandler(), and Update().
Definition at line 277 of file StaminaHandler.c.
Referenced by SetCooldown(), and StaminaHandler().