mirror of
https://github.com/solero/houdini.git
synced 2024-11-08 20:28:20 +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])
|
await penguin.join_room(penguin.server.rooms[room_id])
|
||||||
|
|
||||||
async def remove_penguin(self, p):
|
async def remove_penguin(self, p):
|
||||||
self.penguins.remove(p)
|
self.penguins[self.penguins.index(p)] = None
|
||||||
p.waddle = None
|
p.waddle = None
|
||||||
|
|
||||||
async def send_xt(self, *data, f=None):
|
async def send_xt(self, *data, f=None):
|
||||||
for penguin in filter(f, self.penguins):
|
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):
|
def get_seat_id(self, p):
|
||||||
return self.penguins.index(p)
|
return self.penguins.index(p)
|
||||||
|
Loading…
Reference in New Issue
Block a user