Skip to content

Commit

Permalink
experimental stamina fix (#11323)
Browse files Browse the repository at this point in the history
* experi

* AND operator
  • Loading branch information
Tsar-Salat authored Aug 15, 2024
1 parent 5dea2d1 commit 2299eb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2299eb4

Please sign in to comment.