self.player_char_i = -1
self.admin_passwords = []
self.send_gamestate_min_interval = datetime.timedelta(seconds=0.04)
- self.send_gamestate_max_interval = datetime.timedelta(seconds=5)
self.last_send_gamestate = datetime.datetime.now() -\
self.send_gamestate_min_interval
self.terrains = {
self.io.send('PLAY_ERROR ' + quote(str(e)), connection_id)
# send gamestate if it makes sense at this point
- if self.changed or self.last_send_gamestate < \
- datetime.datetime.now() - self.send_gamestate_max_interval:
+ if self.changed:
self.turn += 1
# send_gamestate() can be rather expensive, due to among other reasons
# re-calculating players' FOVs, so don't send it out too often