[Net] Allow branch-specific MultiplayerAPIs.

Removes custom_multiplayer from Node.
MultiplayerAPI overrides are now set at SceneTree level, and apply to
whole branches.
Impact on performance when using only the default multiplayer or
overriding it is minimal, the use of branches can likely be further
optimized by caching nodes and relevant MultiplayerAPI IDs.
This commit is contained in:
Fabio Alessandrelli 2022-02-05 01:43:47 +01:00
parent 5c54770b7c
commit aee2240d5f
7 changed files with 73 additions and 40 deletions

View file

@ -515,8 +515,6 @@ public:
void rpcp(int p_peer_id, const StringName &p_method, const Variant **p_arg, int p_argcount);
Ref<MultiplayerAPI> get_multiplayer() const;
Ref<MultiplayerAPI> get_custom_multiplayer() const;
void set_custom_multiplayer(Ref<MultiplayerAPI> p_multiplayer);
Node();
~Node();