From 972c3c4aa9647a66eba55ef8f798e8a9915a9c75 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 9 Feb 2018 22:34:01 +0000 Subject: [PATCH] Set sprite frame to 0 when dead. --- src/entities/entity.c | 1 + src/world/entities.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/entities/entity.c b/src/entities/entity.c index 34c98c1..0dd7ccd 100644 --- a/src/entities/entity.c +++ b/src/entities/entity.c @@ -152,6 +152,7 @@ static void activate(int active) static void die(void) { + self->spriteFrame = 0; self->alive = ALIVE_DEAD; } diff --git a/src/world/entities.c b/src/world/entities.c index 198de91..600860f 100644 --- a/src/world/entities.c +++ b/src/world/entities.c @@ -201,6 +201,7 @@ void doEntities(void) if (self->health <= 0) { self->alive = ALIVE_DYING; + self->spriteFrame = 0; self->die(); }