Missing players.clear()
inside the remove_multiplayer_peer
of the example lobby implementation
#10367
Labels
area:manual
Issues and PRs related to the Manual/Tutorials section of the documentation
bug
content:example code
Issues and PRs involving code examples
topic:multiplayer
Your Godot version: v4.3.stable.official.77dcf97d8
Issue description: In the example lobby implementation, a call to
players.clear()
is missing inside theremove_multiplayer_peer
function. Otherwise theplayers
dictionary is not reinitialized when a player disconnects and reconnects. The dictionary will contain among others his own previous multiplayer id which should have been erased because he disconnected, or multiplayer ids of players who disconnected when the player was disconnected himself.URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html#example-lobby-implementation
The text was updated successfully, but these errors were encountered: