[Super-tux-commit] supertux/src gameloop.cpp,1.120,1.121
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-05-04 16:03:59
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22874/src Modified Files: gameloop.cpp Log Message: Fixed frame_ratio() workaround. Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- gameloop.cpp 3 May 2004 13:00:35 -0000 1.120 +++ gameloop.cpp 4 May 2004 16:03:48 -0000 1.121 @@ -546,7 +546,6 @@ draw(); - float overlap = 0.0f; while (exit_status == NONE) { /* Calculate the movement-factor */ @@ -569,19 +568,12 @@ // determistic and not different on different machines if(!game_pause && !Menu::current()) { - frame_ratio *= game_speed; - frame_ratio += overlap; - while (frame_ratio > 0) - { - // Update the world - check_end_conditions(); - if (end_sequence == ENDSEQUENCE_RUNNING) - action(.5f); - else if(end_sequence == NO_ENDSEQUENCE) - action(1.0f); - frame_ratio -= 1.0f; - } - overlap = frame_ratio; + // Update the world + check_end_conditions(); + if (end_sequence == ENDSEQUENCE_RUNNING) + action(frame_ratio/2); + else if(end_sequence == NO_ENDSEQUENCE) + action(frame_ratio); } else { |