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;
|
||||
|
@ -197,6 +199,7 @@ static void applyDamage(int damage)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void attack(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue