From ce13cd4be59c0415877571d92aaea3fd0d5a7e49 Mon Sep 17 00:00:00 2001 From: zlago Date: Wed, 2 Oct 2024 20:39:39 +0200 Subject: entities --- src/player.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index 9efd0ac..b23b2f0 100644 --- a/src/player.c +++ b/src/player.c @@ -1,5 +1,6 @@ #include "main.h" #include "entity.h" +#include "loader.h" #include "input.h" #include "tilemap.h" #include @@ -119,6 +120,7 @@ void anim(struct entity *self, unsigned anim) { static int player_update(struct entity *self) { if (self->hp <= 0) { + self->state = 0; return 1; } switch (self->state) { -- cgit 1.4.1-2-gfad0