godotengine / godotengine/godot-docs
Missing support for changing MultiplayerSpawner authority is undocumented
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
4.4.1-stable
**Issue description:**
Currently, changing the authority of a `MultiplayerSpawner` does inevitably lead to errors and/or undocumented behavior including:
1. Nodes spawned prior to the authority transfer will not be despawned when the new authority deletes them.
2. If a new peer connects after an authority transfer prior to which objects were already spawned, the previous authority owner still tries to call `SceneReplicationInterface::_update_spawn_visibility` for the newly joined client, which of course causes an authorization error.
Looking at the relevant source code, I suspect that the spawner system was not really created with the possibility of `MultiplayerSpawner::set_multiplayer_authority` ever being called in mind, which is the reason I create this issue here instead of the main repository, as I am unsure if this would classify as a bug.
Unfortunately, though, neither the documentation nor the public API do communicate this intention to the user in any way, potentially leading to unexpected problems down the line.
I would propose to add a note to the respective documentation and preferably also add an error or warning message to `MultiplayerSpawner::set_multiplayer_authority` to immediately inform the user of this limitation.
**URL to the documentation page (if already existing):**
https://docs.godotengine.org/en/stable/classes/class_multiplayerspawner.html#multiplayerspawner
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.