Item fix: alguns items es quedaven engantxats en la part de dalt

This commit is contained in:
2025-08-17 16:18:48 +02:00
parent 65ca17f938
commit fc3e2deb1f

View File

@@ -92,8 +92,8 @@ void Item::move() {
// Corrige
pos_y_ = param.game.play_area.rect.y;
// Invierte la velocidad
vel_y_ = -vel_y_;
// Fuerza la velocidad hacia abajo para evitar oscilaciones
vel_y_ = std::abs(vel_y_);
}
// Si colisiona con la parte inferior