afegida guarda per a que en debug el jugador no caiga infinitament si ix de la pantalla

This commit is contained in:
2026-03-30 20:19:07 +02:00
parent 32f22c99db
commit f3bad9f4ed
2 changed files with 5 additions and 1 deletions

View File

@@ -880,6 +880,10 @@ auto Player::handleLandingFromAir(float displacement, const SDL_FRect& projectio
// No hay colisión
y_ += displacement;
#ifdef _DEBUG
// Guarda por si en debug el jugador se sale de la pantalla, para que no esté cayendo infinitamente
if (y_ > PlayArea::BOTTOM + HEIGHT) { y_ = PlayArea::TOP + 2; }
#endif
return false;
}