From 2859e30482c795adc9ed7dddc6453026a9287411 Mon Sep 17 00:00:00 2001 From: zakarya Date: Fri, 3 Mar 2023 12:39:41 -0800 Subject: [PATCH] changed interval setting to be correct --- script/game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/game.js b/script/game.js index 7a85da6..76c0e4b 100644 --- a/script/game.js +++ b/script/game.js @@ -171,8 +171,8 @@ function message(type, data) { //incoming message else if (type === "server_data") { if ("fps" in data) { server_fps = data.fps; - clearInterval(send_position_to_server); - setInterval(send_position_to_server, server_fps); + clearInterval(update_server_tick); + update_server_tick = setInterval(send_position_to_server, server_fps); } } else {