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