void Application::UpdateWorld(Uint32 deltaT) {
if (!CurrentState()) return;
- for (Uint32 i(0); i < deltaT; ++i) {
+ for (Uint32 i(0); i < deltaT && !StateChangePending(); ++i) {
CurrentState()->PhysicsTimers().Update(0.001f);
CurrentState()->UpdateWorld(0.001f);
}