From 93ccfeeb9032eec91e0a4e5053f6646a5c73fe2d Mon Sep 17 00:00:00 2001 From: zlago Date: Thu, 26 Dec 2024 00:07:12 +0100 Subject: bugfixes --- src/player.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index e7dfd98..0bf09de 100644 --- a/src/player.c +++ b/src/player.c @@ -169,6 +169,9 @@ static int move(struct entity *self) { self->facing = +1; } self->velocity.y += GRAVITY; + if (self->velocity.y > to_fixed(8)) { + self->hp = 0; // 'fell out of bounds' probably + } // y collision self->y += self->velocity.y; collision_T const cy = collide(self); -- cgit 1.4.1-2-gfad0