From 45c7c5621a602e4acbeffb5d22a65694a1fa74d6 Mon Sep 17 00:00:00 2001 From: Sergio Date: Tue, 7 Apr 2026 12:26:45 +0200 Subject: [PATCH] =?UTF-8?q?fix=20en=20transici=C3=B3=20rapida=20de=20panta?= =?UTF-8?q?lles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game/scenes/game.cpp | 5 +++++ source/game/scenes/game.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/source/game/scenes/game.cpp b/source/game/scenes/game.cpp index 099af09..c9dc101 100644 --- a/source/game/scenes/game.cpp +++ b/source/game/scenes/game.cpp @@ -797,6 +797,10 @@ void Game::checkPlayerIsOnBorder() { if (transitioning_) { return; } + if (transition_just_ended_) { + transition_just_ended_ = false; + return; + } if (player_->isOnBorder()) { const auto BORDER = player_->getBorder(); @@ -837,6 +841,7 @@ void Game::checkPlayerIsOnBorder() { // Finaliza la transición entre pantallas void Game::endTransition() { transitioning_ = false; + transition_just_ended_ = true; transition_timer_ = 0.0F; transition_old_room_.reset(); transition_direction_ = Room::Border::NONE; diff --git a/source/game/scenes/game.hpp b/source/game/scenes/game.hpp index a825b9c..8e1ba3e 100644 --- a/source/game/scenes/game.hpp +++ b/source/game/scenes/game.hpp @@ -111,6 +111,7 @@ class Game { float transition_timer_{0.0F}; // Tiempo transcurrido en la transición std::shared_ptr transition_old_room_; // Habitación saliente (se mantiene viva durante la transición) Room::Border transition_direction_{Room::Border::NONE}; // Dirección de la transición + bool transition_just_ended_{false}; // Cooldown de 1 frame tras finalizar transición // Variables de demo mode DemoData demo_; // Variables para el modo demo