Move infocus and network updates to fixedloop()

Updating them every delta frame is way too fast.
This commit is contained in:
Misa authored and Ethan Lee committed 2020-06-19 09:05:48 -04:00
1 parent acf47bfeac
commit 867e7bc1e6
1 file changed
+5 -5
+5 -5
View File
@@ -361,11 +361,6 @@ void gameloop()
void deltaloop()
{
game.infocus = key.isActive;
// Update network per frame.
NETWORK_update();
//timestep limit to 30
const float rawdeltatime = static_cast<float>(time_ - timePrev);
accumulator += rawdeltatime;
@@ -432,6 +427,11 @@ void deltaloop()
void fixedloop()
{
game.infocus = key.isActive;
// Update network per frame.
NETWORK_update();
key.Poll();
if(key.toggleFullscreen)
{