From a0937c1f3712d61831911075c7dacedcb616a261 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 3 Dec 2020 02:24:29 +0100 Subject: [PATCH] Add comment explaining game state sending interval. --- plomrogue/game.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plomrogue/game.py b/plomrogue/game.py index 3c927db..bfa521c 100755 --- a/plomrogue/game.py +++ b/plomrogue/game.py @@ -265,6 +265,8 @@ class Game(GameBase): self.io.send('PLAY_ERROR ' + quote(str(e)), connection_id) if self.changed: self.turn += 1 + # send_gamestate() can be rather expensive, due to among other reasons + # re-calculating each player's FOV, so don't send it out too often if self.last_send_gamestate < \ datetime.datetime.now() -self.send_gamestate_interval: self.send_gamestate() -- 2.30.2