suppress some errors

This commit is contained in:
Alberto Xamin 2020-12-25 21:04:47 +01:00
parent 1bfa6ab2b6
commit 632635e464
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2

View File

@ -214,9 +214,9 @@ class Player:
self.game.player_death(self) self.game.player_death(self)
if self.game: # falso quando un bot viene eliminato dalla partita if self.game: # falso quando un bot viene eliminato dalla partita
self.sio.emit('self_vis', room=self.sid, data=json.dumps(self.game.get_visible_players(self), default=lambda o: o.__dict__)) self.sio.emit('self_vis', room=self.sid, data=json.dumps(self.game.get_visible_players(self), default=lambda o: o.__dict__))
self.game.notify_all()
self.sio.emit('self', room=self.sid, data=json.dumps( self.sio.emit('self', room=self.sid, data=json.dumps(
ser, default=lambda o: o.__dict__)) ser, default=lambda o: o.__dict__))
self.game.notify_all()
def bot_spin(self): def bot_spin(self):
while self.is_bot and self.game != None and not self.game.shutting_down: while self.is_bot and self.game != None and not self.game.shutting_down:
@ -225,7 +225,7 @@ class Player:
self.bot_logic() self.bot_logic()
def bot_logic(self): def bot_logic(self):
if self.game.shutting_down: return if self.game == None or self.game.shutting_down: return
if self.pending_action != None and self.pending_action != PendingAction.WAIT: if self.pending_action != None and self.pending_action != PendingAction.WAIT:
# eventlet.sleep(uniform(self.game.bot_speed/2-0.1, self.game.bot_speed)) # eventlet.sleep(uniform(self.game.bot_speed/2-0.1, self.game.bot_speed))
pass pass