Skip to content

Commit

Permalink
Only update integrations once per logical game step
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Oct 8, 2023
1 parent 2a43b02 commit 5ca1af1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/supertux/screen_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,6 @@ ScreenManager::handle_screen_switch()

void ScreenManager::loop_iter()
{
// Useful if screens edit their status without switching screens
Integration::update_status_all(m_screen_stack.back()->get_status());
Integration::update_all();

Uint32 ticks = SDL_GetTicks();
elapsed_ticks += ticks - last_ticks;
last_ticks = ticks;
Expand All @@ -595,6 +591,10 @@ void ScreenManager::loop_iter()
return;
}

// Useful if screens edit their status without switching screens
Integration::update_status_all(m_screen_stack.back()->get_status());
Integration::update_all();

g_real_time = static_cast<float>(ticks) / 1000.0f;

float speed_multiplier = g_debug.get_game_speed_multiplier();
Expand Down

0 comments on commit 5ca1af1

Please sign in to comment.