avoid bots taking over the server
This commit is contained in:
parent
5f8b23e8f4
commit
7ff3895433
@ -228,7 +228,7 @@ class Player:
|
|||||||
|
|
||||||
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:
|
||||||
eventlet.sleep(uniform(self.game.bot_speed/2-0.1, self.game.bot_speed))
|
eventlet.sleep(min(0.2, uniform(self.game.bot_speed/2-0.1, self.game.bot_speed)))
|
||||||
if self.lives > 0 or self.is_ghost:
|
if self.lives > 0 or self.is_ghost:
|
||||||
self.bot_logic()
|
self.bot_logic()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user