From bd1dac445a0d1a0691a82e01c8d3e978eb13c5ec Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 12 May 2016 09:34:33 +0100 Subject: [PATCH] Fighter damage indication fix. --- src/battle/fighters.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/battle/fighters.c b/src/battle/fighters.c index 05e8008..1399112 100644 --- a/src/battle/fighters.c +++ b/src/battle/fighters.c @@ -464,15 +464,16 @@ void damageFighter(Entity *e, int amount, long flags) { e->shield -= amount; - amount = 0; - - if (e->shield < 0) + if (e->shield <= 0) { - amount = -e->shield; + e->armourHit = 255; + e->health += e->shield; + e->shield = 0; + + playBattleSound(SND_ARMOUR_HIT, e->x, e->y); } } - - if (amount > 0) + else { e->health -= amount; e->armourHit = 255;