From: Christian Heller Date: Thu, 3 Dec 2020 01:24:29 +0000 (+0100) Subject: Add comment explaining game state sending interval. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/te"st.html?a=commitdiff_plain;h=a0937c1f3712d61831911075c7dacedcb616a261;p=plomrogue2 Add comment explaining game state sending interval. --- 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()