afegida guarda per a que en debug el jugador no caiga infinitament si ix de la pantalla
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user