From 1e9744384b45a91a32a2a386fcf47ccfe52f1421 Mon Sep 17 00:00:00 2001 From: Loxnebot Date: Sat, 14 Mar 2026 11:43:14 +0200 Subject: [PATCH] dada --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 6d148c3..838fcee 100644 --- a/main.py +++ b/main.py @@ -123,7 +123,6 @@ class Player: self.x = WIDTH def apply_gravity(self): - self.prev_y = self.y self.y_velocity += GRAVITY self.y += self.y_velocity @@ -133,6 +132,9 @@ class Player: self.y_velocity = 0 self.jumping = False + if self.y < 0: + self.y = 0 + self.y_velocity = 0 def update_animation(self): if self.jumping: up_thresh = -self.jump_power * 0.4