Explorar el Código

slow down websocket send (from 100ms to 200ms)

jblanked hace 10 meses
padre
commit
e4323e5607
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      game/player.c

+ 2 - 2
game/player.c

@@ -235,8 +235,8 @@ static void player_update(Entity *self, GameManager *manager, void *context)
         if (player->old_position.x != pos.x || player->old_position.y != pos.y)
         {
             elapsed_ws_timer++;
-            // only send the websocket update every 100ms
-            if (elapsed_ws_timer >= (game_context->fps / 10))
+            // only send the websocket update every 200ms
+            if (elapsed_ws_timer >= (game_context->fps / 5))
             {
                 if (game_context->fhttp)
                 {