From 460161008c9d6bd48a471742f87ac0ff06150b32 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Wed, 4 Nov 2015 08:58:58 -0800 Subject: [PATCH] Critical fix: Simple_animal invincibility. Also removes Halloss from updatehealth() calculations, it doesn't belong there, and halloss is deprecated regardless. --- code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/simple_animal/simple_animal.dm | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9806145854b..82807279717 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -69,7 +69,7 @@ health = maxHealth stat = CONSCIOUS return - health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() - halloss + health = maxHealth - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() - getCloneLoss() //This proc is used for mobs which are affected by pressure to calculate the amount of pressure that actually diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 887bf93c611..6cde4e588aa 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -87,9 +87,11 @@ ..() /mob/living/simple_animal/updatehealth() - return + ..() + health = Clamp(health, 0, maxHealth) /mob/living/simple_animal/Life() + updatehealth() update_gravity(mob_has_gravity()) update_canmove() @@ -107,9 +109,6 @@ if(health < 1) Die() - if(health > maxHealth) - health = maxHealth - if(resting && icon_resting && stat != DEAD) icon_state = icon_resting else if(icon_resting && stat != DEAD)