mirror of
https://github.com/solero/houdini.git
synced 2024-12-22 13:33:39 +00:00
Prevent waddle seat IDs going out of sync
Fixes bug where CJ Fire games would become unresponsive after a player has left or lost the game
This commit is contained in:
parent
82fbd497a7
commit
176a65e0ec
@ -75,12 +75,13 @@ class IWaddle(ABC):
|
||||
await penguin.join_room(penguin.server.rooms[room_id])
|
||||
|
||||
async def remove_penguin(self, p):
|
||||
self.penguins.remove(p)
|
||||
self.penguins[self.penguins.index(p)] = None
|
||||
p.waddle = None
|
||||
|
||||
async def send_xt(self, *data, f=None):
|
||||
for penguin in filter(f, self.penguins):
|
||||
await penguin.send_xt(*data)
|
||||
if penguin is not None:
|
||||
await penguin.send_xt(*data)
|
||||
|
||||
def get_seat_id(self, p):
|
||||
return self.penguins.index(p)
|
||||
|
Loading…
Reference in New Issue
Block a user