From 867e7bc1e6ab7d18c2a5ddb645b2d02ef8961266 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 14 Jun 2020 11:58:27 -0700 Subject: [PATCH] Move infocus and network updates to fixedloop() Updating them every delta frame is way too fast. --- desktop_version/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 9d0c79d1..717b0e45 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -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(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) {