DayZ 1.29
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 строка 981

982 {
983 if (m_Stamina <= 0)
984 {
985 m_StaminaDepleted = true;
987 if (!m_IsInCooldown)
988 {
989 // set this only once
990 SetCooldown(GameConstants.STAMINA_REGEN_COOLDOWN_EXHAUSTION);
991 }
992 }
993 else
994 {
995 m_StaminaDepleted = false;
996 }
997 }
bool m_StaminaDepleted
Определения StaminaHandler.c:284
float m_Stamina
Определения StaminaHandler.c:269
void SetCooldown(float time, int modifier=-1)
set cooldown timer between each consume of stamina
Определения StaminaHandler.c:1000
bool m_IsInCooldown
Определения StaminaHandler.c:292

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

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