mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 18:19:43 +01:00
Move infocus and network updates to fixedloop()
Updating them every delta frame is way too fast.
This commit is contained in:
parent
acf47bfeac
commit
867e7bc1e6
1 changed files with 5 additions and 5 deletions
|
@ -361,11 +361,6 @@ void gameloop()
|
||||||
|
|
||||||
void deltaloop()
|
void deltaloop()
|
||||||
{
|
{
|
||||||
game.infocus = key.isActive;
|
|
||||||
|
|
||||||
// Update network per frame.
|
|
||||||
NETWORK_update();
|
|
||||||
|
|
||||||
//timestep limit to 30
|
//timestep limit to 30
|
||||||
const float rawdeltatime = static_cast<float>(time_ - timePrev);
|
const float rawdeltatime = static_cast<float>(time_ - timePrev);
|
||||||
accumulator += rawdeltatime;
|
accumulator += rawdeltatime;
|
||||||
|
@ -432,6 +427,11 @@ void deltaloop()
|
||||||
|
|
||||||
void fixedloop()
|
void fixedloop()
|
||||||
{
|
{
|
||||||
|
game.infocus = key.isActive;
|
||||||
|
|
||||||
|
// Update network per frame.
|
||||||
|
NETWORK_update();
|
||||||
|
|
||||||
key.Poll();
|
key.Poll();
|
||||||
if(key.toggleFullscreen)
|
if(key.toggleFullscreen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue