Don't reset a unit's alive status if it's already dead.
This commit is contained in:
parent
cf5939dd3c
commit
c39974e2a7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue