summary refs log tree commit diff
path: root/src/player.c
diff options
context:
space:
mode:
authorzlago2024-12-26 00:07:12 +0100
committerzlago2024-12-26 00:07:12 +0100
commit93ccfeeb9032eec91e0a4e5053f6646a5c73fe2d (patch)
tree1dc3fe57f13ea95e16d636354090fffeb7c6c24a /src/player.c
parentf7e4de7c45ed848312690ce6cfb62ae562e8347c (diff)
bugfixes
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c3
1 files changed, 3 insertions, 0 deletions
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);