fix debug disconnect
This commit is contained in:
parent
699c976c75
commit
461dfb8841
@ -125,6 +125,8 @@ class Game:
|
|||||||
self.replay_speed = speed
|
self.replay_speed = speed
|
||||||
for i in range(len(log)-1):
|
for i in range(len(log)-1):
|
||||||
print('replay:', i, 'of', len(log)-3, '->', log[i])
|
print('replay:', i, 'of', len(log)-3, '->', log[i])
|
||||||
|
if len(self.spectators) == 0:
|
||||||
|
break
|
||||||
if (log[i] == "@@@"):
|
if (log[i] == "@@@"):
|
||||||
eventlet.sleep(10)
|
eventlet.sleep(10)
|
||||||
if self.is_replay:
|
if self.is_replay:
|
||||||
|
@ -150,7 +150,7 @@ class Player:
|
|||||||
print(f'I {self.name} joined {self.game}')
|
print(f'I {self.name} joined {self.game}')
|
||||||
|
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
if self.is_admin() and self.game.debug: return False
|
if self.is_admin() and self.game.debug and self.game.started: return False
|
||||||
return self.game.handle_disconnect(self)
|
return self.game.handle_disconnect(self)
|
||||||
|
|
||||||
def set_role(self, role: r.Role):
|
def set_role(self, role: r.Role):
|
||||||
|
Loading…
Reference in New Issue
Block a user