Explorar o código

[WebSocket] Fix peers handling in multiplayer example.

Disconnected peers were not properly removed from the local peers list.
Fabio Alessandrelli %!s(int64=2) %!d(string=hai) anos
pai
achega
f47f25180c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      networking/websocket_multiplayer/script/game.gd

+ 1 - 1
networking/websocket_multiplayer/script/game.gd

@@ -64,7 +64,7 @@ func do_action(action):
 	var pos = _players.find(id)
 	if pos == -1:
 		return
-	_players.erase(pos)
+	_players.remove_at(pos)
 	_list.remove_item(pos)
 	if _turn > pos:
 		_turn -= 1