From d88b42a51690be303fd9e3a9aa8aa4d7695055ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Mon, 14 Nov 2022 22:58:13 +0100 Subject: [PATCH] Fix: El jugador ya no puede moverse hacia un lateral nada mas subir a la pantalla superior --- source/player.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/player.cpp b/source/player.cpp index af91104..bec807a 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -273,6 +273,14 @@ void Player::checkState() vy = 0.0f; jumpCounter = 0; fallCounter = 0; + if (!isOnFloor() && !isOnAutoSurface()) + { + setState(s_falling); + vx = 0.0f; + vy = maxVY; + fallCounter++; + playFallSound(); + } } else if (state == s_jumping)