ockapy / Game-Jam2

BUT3 Game-Jam
0 stars 0 forks source link

Crash client après interruption de la partie (Escape) (2 clients) #20

Open Scrpi0 opened 2 months ago

Scrpi0 commented 2 months ago

method :

cl1: con cl2: con srv: start cl1: esc cl1: con cl1: back main menu cl1: con cl2: esc cl2: con: cl2: crash cl1: display 3 players

alt. method :

cl1: con cl2: con srv: start cl1: esc cl1: con cl2: esc cl2: con cl1: crash cl2: display 3 players

server trace:

pygame 2.6.0 (SDL 2.28.4, Python 3.12.3) Hello from the pygame community. https://www.pygame.org/contribute.html config={'server_ip': '127.0.0.1', 'server_port': 9999, 'num_player': 2} Start server INFO: New connection from ('127.0.0.1', 47487) with network id 1 INFO: New connection from ('127.0.0.1', 39146) with network id 2 INFO: Starting game ! [[550, 340], [240, 336]] removed client ('127.0.0.1', 47487) INFO: New connection from ('127.0.0.1', 47487) with network id 1 removed client ('127.0.0.1', 47487) INFO: New connection from ('127.0.0.1', 47487) with network id 2 INFO: New connection from ('127.0.0.1', 39146) with network id 3 INFO: Starting game ! [[550, 340], [240, 336]]

cl1 trace :

pygame 2.6.0 (SDL 2.28.4, Python 3.12.3) Hello from the pygame community. https://www.pygame.org/contribute.html INFO: Client connected to ('127.0.0.1', 9999) 1 2 2 2 b'{"map": "Default", "size": [800, 600]}' Default True True disconnect INFO: Client connected to ('127.0.0.1', 9999) 1 2 disconnect INFO: Client connected to ('127.0.0.1', 9999) 1 2 2 2 b'{"map": "Default", "size": [800, 600]}' Default

cl2 trace :

pygame 2.6.0 (SDL 2.28.4, Python 3.12.3) Hello from the pygame community. https://www.pygame.org/contribute.html INFO: Client connected to ('127.0.0.1', 9999) 2 2 b'{"map": "Default", "size": [800, 600]}' Default Number 2 win the game False False True True disconnect INFO: Client connected to ('127.0.0.1', 9999) 2 2 b'{"map": "Default", "size": [800, 600]}' Default Traceback (most recent call last): File "/home/scheerc/Documents/git/Game-Jam2/client/main.py", line 8, in main() File "/home/scheerc/Documents/git/Game-Jam2/client/main.py", line 5, in main client.run() File "/home/scheerc/Documents/git/Game-Jam2/client/Client.py", line 66, in run self.game.update_game(packets) File "/home/scheerc/Documents/git/Game-Jam2/client/Game.py", line 124, in update_game if self.entities.get(str(self.connection.net_id)).is_fighting() : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'is_fighting'