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):