DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ CheckStaminaState()

void StaminaHandler::CheckStaminaState ( )
inlineprotected

check if the stamina is completely depleted

in case of complete depletion - start a cooldown timer before the regeneration cycle start

См. определение в файле StaminaHandler.c строка 834

835 {
836 if (m_Stamina <= 0)
837 {
838 m_StaminaDepleted = true;
840 if (!m_IsInCooldown)
841 {
842 // set this only once
843 SetCooldown(GameConstants.STAMINA_REGEN_COOLDOWN_EXHAUSTION);
844 }
845 }
846 else
847 {
848 m_StaminaDepleted = false;
849 }
850 }
bool m_StaminaDepleted
DEPRECATED.
Определения StaminaHandler.c:277
float m_Stamina
Определения StaminaHandler.c:264
void SetCooldown(float time, int modifier=-1)
set cooldown timer between each consume of stamina
Определения StaminaHandler.c:853
bool m_IsInCooldown
Определения StaminaHandler.c:286

Перекрестные ссылки m_IsInCooldown, m_Stamina, m_StaminaDepleted, SetCooldown() и GameConstants::STAMINA_REGEN_COOLDOWN_EXHAUSTION.

Используется в Update().