[Fix] dt weirdness on low fps.
This commit is contained in:
parent
e066250c1f
commit
240869046b
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user