Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing players.clear() inside the remove_multiplayer_peer of the example lobby implementation #10367

Open
Gr0minet opened this issue Dec 4, 2024 · 0 comments
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

Comments

@Gr0minet
Copy link

Gr0minet commented Dec 4, 2024

Your Godot version: v4.3.stable.official.77dcf97d8

Issue description: In the example lobby implementation, a call to players.clear() is missing inside the remove_multiplayer_peer function. Otherwise the players 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

@Gr0minet Gr0minet added the bug label Dec 4, 2024
@tetrapod00 tetrapod00 added area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:multiplayer content:example code Issues and PRs involving code examples labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants