From d320ed5f451b09d455a1a312a4aac5be04da10f8 Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Thu, 22 Apr 2004 00:00:58 +0000 Subject: [PATCH] patch from MatzeB for freeze at level start SVN-Revision: 620 --- src/gameloop.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 2b689b8e5..64d3ee839 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -57,10 +57,17 @@ GameSession* GameSession::current_ = 0; GameSession::GameSession(const std::string& subset_, int levelnb_, int mode) - : world(0), st_gl_mode(mode), levelnb(levelnb_), subset(subset_) + : world(0), st_gl_mode(mode), levelnb(levelnb_), end_sequenze(false), + subset(subset_) { current_ = this; - end_sequenze = false; + + global_frame_counter = 0; + game_pause = false; + + fps_timer.init(true); + frame_timer.init(true); + restart_level(); } @@ -470,16 +477,9 @@ GameSession::run() Player* tux = world->get_tux(); current_ = this; - int fps_cnt; - - global_frame_counter = 0; - game_pause = false; - - fps_timer.init(true); - frame_timer.init(true); + int fps_cnt = 0; - last_update_time = st_get_ticks(); - fps_cnt = 0; + update_time = last_update_time = st_get_ticks(); /* Clear screen: */ clearscreen(0, 0, 0); -- 2.11.0