Don't reset a unit's alive status if it's already dead.

This commit is contained in:
Steve 2018-03-18 08:36:51 +00:00
parent cf5939dd3c
commit c39974e2a7
1 changed files with 22 additions and 19 deletions

View File

@ -173,6 +173,8 @@ static void applyDamage(int damage)
u = (Unit*)self;
if (u->alive != ALIVE_DEAD)
{
if (u->health < 0)
{
u->health = 0;
@ -196,6 +198,7 @@ static void applyDamage(int damage)
playBattleSound(SND_APPEAR, self->uniqueId % MAX_SND_CHANNELS, u->x, u->y);
}
}
}
}
static void attack(void)