From 90a33d36c34b1512270a6724564995dd8bf914a6 Mon Sep 17 00:00:00 2001
From: Max-001 <maxsmits21@kpnmail.nl>
Date: Fri, 10 Jan 2025 16:47:08 +0100
Subject: Bug fixes

---
 game/player/PlayerEndScript.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'game/player')

diff --git a/game/player/PlayerEndScript.cpp b/game/player/PlayerEndScript.cpp
index 4ae813f..62fd350 100644
--- a/game/player/PlayerEndScript.cpp
+++ b/game/player/PlayerEndScript.cpp
@@ -92,8 +92,9 @@ bool PlayerEndScript::on_collision(const crepe::CollisionEvent & ev) {
 			jump++;
 		}
 
-		if (rb_player.data.linear_velocity.x < 5 && jump >= 3) {
+		if (rb_player.data.linear_velocity.x < 5 && jump == 3) {
 			this->trigger_event<EndGameEvent>();
+			jump++;
 		}
 
 		return false;
-- 
cgit v1.2.3