summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
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);