From 1f3055a443b1856355d20d8a6a631054d6630e23 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Wed, 13 Feb 2008 01:18:51 +0000 Subject: [PATCH] Bugfix: the camera would tilt too much if the loading time of a track is long. Removed some debug output. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1475 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/game_manager.cpp | 4 +++- src/world.cpp | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game_manager.cpp b/src/game_manager.cpp index c4cd5b199..90f4ffd04 100644 --- a/src/game_manager.cpp +++ b/src/game_manager.cpp @@ -81,7 +81,9 @@ void GameManager::run() { music_on = false; float dt = (m_curr_time - m_prev_time ) * 0.001f; - scene->draw(dt); + // In the first call dt might be large (includes loading time), + // which can cause the camera to significantly tilt + scene->draw(world->getPhase()==World::SETUP_PHASE ? 0.0f : dt); if ( world->getPhase() != World::LIMBO_PHASE) { world->update(dt); diff --git a/src/world.cpp b/src/world.cpp index a10edae17..1107d7d20 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -91,9 +91,7 @@ World::World(const RaceSetup& raceSetup_) : m_race_setup(raceSetup_) // Load the track models - this must be done before the karts so that the // karts can be positioned properly on (and not in) the tracks. - printf("begin loading track\n"); loadTrack() ; - printf("endloading track\n"); int pos = 0; int playerIndex = 0;