fix: Mantener gravedad OFF al cambiar escenario en modo BOIDS
Problema: - Al cambiar de escenario (teclas 1-8) en modo BOIDS, la gravedad se reseteaba a 720 en lugar de mantenerse en 0 - SceneManager::changeScenario() reinicializa bolas con gravedad default - Esto rompía el invariante: "modo BOIDS = gravedad OFF siempre" Solución: - Añadido check en Engine::changeScenario() para forzar gravedad OFF después del cambio de escenario si estamos en modo BOIDS - Mantiene consistencia con el comportamiento de SHAPE mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -523,6 +523,11 @@ void Engine::changeScenario(int scenario_id, const char* notification_text) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Si estamos en modo BOIDS, desactivar gravedad (modo BOIDS = gravedad OFF siempre)
|
||||||
|
if (current_mode_ == SimulationMode::BOIDS) {
|
||||||
|
scene_manager_->forceBallsGravityOff();
|
||||||
|
}
|
||||||
|
|
||||||
showNotificationForAction(notification_text);
|
showNotificationForAction(notification_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user