[Super-tux-commit] supertux/src title.cpp,1.61,1.62
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-04-26 13:01:06
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6065 Modified Files: title.cpp Log Message: - fix for title-demo going weird Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- title.cpp 25 Apr 2004 21:55:39 -0000 1.61 +++ title.cpp 26 Apr 2004 13:00:56 -0000 1.62 @@ -253,6 +253,10 @@ Menu::set_current(main_menu); while (Menu::current()) { + // if we spent to much time on a menu entry + if( (update_time - last_update_time) > 1000) + update_time = last_update_time = st_get_ticks(); + // Calculate the movement-factor double frame_ratio = ((double)(update_time-last_update_time))/((double)FRAME_RATE); if(frame_ratio > 1.5) /* Quick hack to correct the unprecise CPU clocks a little bit. */ |