game: fix: cleint see others players update
This commit is contained in:
@ -92,7 +92,7 @@ class Player(Spectator):
|
||||
invalid_pos: bool = new_position.position != new_position_verified.position
|
||||
|
||||
if (new_position != self.position):
|
||||
self.game._update_player(self)
|
||||
self.game.update_player(self)
|
||||
|
||||
self.position = new_position
|
||||
|
||||
@ -102,14 +102,13 @@ class Player(Spectator):
|
||||
def connect(self, socket: WebsocketConsumer):
|
||||
self.socket = socket
|
||||
self.accept()
|
||||
self.game._update_player(self)
|
||||
self.game.update_player(self)
|
||||
|
||||
def is_connected(self):
|
||||
return self.socket != None
|
||||
|
||||
def disconnect(self, code: int = 1000):
|
||||
self.socket = None
|
||||
print("bozoman")
|
||||
self.game.leave(self)
|
||||
|
||||
def add_goal(self):
|
||||
@ -118,8 +117,6 @@ class Player(Spectator):
|
||||
|
||||
self.score.append(timestamp)
|
||||
|
||||
print(self.score)
|
||||
|
||||
return timestamp
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
|
Reference in New Issue
Block a user