fix player still in matchmaking queue after leaving game
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
|
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/09/13 16:20:58 by tomoron #+# #+# #
|
# Created: 2024/09/13 16:20:58 by tomoron #+# #+# #
|
||||||
# Updated: 2024/09/28 18:18:51 by tomoron ### ########.fr #
|
# Updated: 2024/09/28 19:34:44 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -198,8 +198,8 @@ class Game:
|
|||||||
while(Game.waitingForPlayerLock):
|
while(Game.waitingForPlayerLock):
|
||||||
time.sleeep(0.05)
|
time.sleeep(0.05)
|
||||||
Game.waitingForPlayerLock = True
|
Game.waitingForPlayerLock = True
|
||||||
if(Game.waitingForPlayerLock == socket):
|
if(Game.waitingForPlayer == self):
|
||||||
Game.waitingForPlayerLock = False;
|
Game.waitingForPlayer = None;
|
||||||
Game.waitingForPlayerLock = False
|
Game.waitingForPlayerLock = False
|
||||||
if(self.started):
|
if(self.started):
|
||||||
self.endGame(1 if self.left == 2 else 2)
|
self.endGame(1 if self.left == 2 else 2)
|
||||||
|
Reference in New Issue
Block a user