From 2299eb4f37dd0ed16b30db654ec651adae4988f2 Mon Sep 17 00:00:00 2001 From: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:58:51 -0400 Subject: [PATCH] experimental stamina fix (#11323) * experi * AND operator --- code/modules/mob/living/carbon/carbon.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 2e521d1b91055..6c2324f0f8bf5 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -509,9 +509,10 @@ /mob/living/carbon/update_stamina(extend_stam_crit = FALSE) var/stam = getStaminaLoss() - if(stam >= DAMAGE_PRECISION && (maxHealth - stam) <= crit_threshold && !stat && !HAS_TRAIT(src, TRAIT_NOSTAMCRIT)) + if(stam >= DAMAGE_PRECISION && (maxHealth - stam) <= crit_threshold && !HAS_TRAIT(src, TRAIT_NOSTAMCRIT)) if(!stat) - enter_stamcrit() + if(extend_stam_crit && !HAS_TRAIT_FROM(src, TRAIT_INCAPACITATED, STAMINA)) + enter_stamcrit() else if(HAS_TRAIT_FROM(src, TRAIT_INCAPACITATED, STAMINA)) REMOVE_TRAIT(src, TRAIT_INCAPACITATED, STAMINA) REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, STAMINA)