Set sprite frame to 0 when dead.
This commit is contained in:
parent
31d55d6954
commit
972c3c4aa9
|
@ -152,6 +152,7 @@ static void activate(int active)
|
||||||
|
|
||||||
static void die(void)
|
static void die(void)
|
||||||
{
|
{
|
||||||
|
self->spriteFrame = 0;
|
||||||
self->alive = ALIVE_DEAD;
|
self->alive = ALIVE_DEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,7 @@ void doEntities(void)
|
||||||
if (self->health <= 0)
|
if (self->health <= 0)
|
||||||
{
|
{
|
||||||
self->alive = ALIVE_DYING;
|
self->alive = ALIVE_DYING;
|
||||||
|
self->spriteFrame = 0;
|
||||||
self->die();
|
self->die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue