home · contact · privacy
Add comment explaining game state sending interval.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 3 Dec 2020 01:24:29 +0000 (02:24 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 3 Dec 2020 01:24:29 +0000 (02:24 +0100)
plomrogue/game.py

index 3c927dbb7dc92e2718b08185f71e496f469694e1..bfa521c81e04d23cb1253201224c8cb439fa29d4 100755 (executable)
@@ -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()