From ff387d6aafd88c82bb054f67bfa571f24cc30800 Mon Sep 17 00:00:00 2001 From: GAGIEL Date: Thu, 28 Apr 2016 00:13:36 +0800 Subject: [PATCH] jumping outside the wall and falling to infinity. I don't fix it fully because it's really fun to walk outside the world. --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 6f962e33..d35b4cf9 100644 --- a/main.py +++ b/main.py @@ -601,6 +601,8 @@ def _update(self, dt): # collisions x, y, z = self.position x, y, z = self.collide((x + dx, y + dy, z + dz), PLAYER_HEIGHT) + # fix bug for jumping outside the wall and falling to infinity. + y = max(-1.25, y) self.position = (x, y, z) def collide(self, position, height):