From 460c229266a3d87b98c707d1ba48edb58114630e Mon Sep 17 00:00:00 2001 From: madiwka3 Date: Sat, 8 Aug 2020 15:39:37 +0600 Subject: [PATCH] SS --- main.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/main.lua b/main.lua index 9b02405..4ccd2a4 100644 --- a/main.lua +++ b/main.lua @@ -24,7 +24,7 @@ wall1width = 30 nuclearanimation = 3 easternum = 0 ball_DIR = 0 -updaterate = 0.1 +updaterate = 0.03 RED = 255 hitNum = {} hitNum[1] = 0 @@ -710,20 +710,27 @@ function love.update(dt) if globalState == "menu" then debugCheck(dt) end - if ts > updaterate then + if globalState == "nettest" then basegame(dt) - nettest(dt) + if ts > updaterate then + nettest(dt) + ts = ts - updaterate + end + end if globalState == "clienttest" then if confirmation ~= "disconnected" then lastSentKeyP1 = lastSentKeyClient clientsBaseGame(dt) end + if ts > updaterate then clienttest(dt) + ts = ts - updaterate + end end - ts = ts - updaterate -end + + end serverinit = false clientinit = false