[Fix] dt weirdness on low fps.

This commit is contained in:
Allanis 2013-07-21 16:03:32 +01:00
parent e066250c1f
commit 240869046b

View File

@ -302,7 +302,7 @@ static void fps_control(void) {
} }
} }
const double fps_min = 1./50.0; static const double fps_min = 1./50.0;
/** /**
* @brief Updates the game itself (player flying around etc). * @brief Updates the game itself (player flying around etc).
*/ */
@ -325,8 +325,10 @@ static void update_all(void) {
update_routine(fps_min); update_routine(fps_min);
tmpdt -= fps_min; tmpdt -= fps_min;
} }
} /* Note we don't touch cur_dt so that fps_delay works well. */
update_routine(cur_dt); update_routine(tmpdt); /* Leftovers. */
} else /* Standard, just update with the last dt. */
update_routine(cur_dt);
} }
/** /**