Synchronizers for spawned nodes were not correctly keeping track of the
net ID assigned by the remote, preventing the replication from
performing the proper cleanup.
This resulted in errors being thrown when sync messages were received
after despawn (which is possible due to their unreliable nature).
(cherry picked from commit 89dacb88ec)
Ensures that spawnable nodes (i.e. spawned nodes over which the local
instance has authority) always have a network ID, since they may lose it
after the multiplayer is reset (e.g. when changing the multiplayer peer).
(cherry picked from commit cb08f2a968)
The auth implementation was treating any received packet as a remote
confirmation after the peer was confirmed locally.
It now correctly awaits for the remote confirmation packet before
admitting new peers.
(cherry picked from commit 754036f82f)
The SceneMultiplayer complete_auth method was not configuring the
multiplayer peer correctly, causing it to potentially send the
notification to the wrong peer, on the wrong channel, and/or with an
incorrect transfer mode.
(cherry picked from commit 4826c14d20)
Fix set_multiplayer_authority not resetting the synchronizer.
Fix the reset function not clearing the watchers state.
Skip wrap around check for the first sync packet after reset.
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.
This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
REPLICATION_MODE_ALWAYS (sync) and REPLICATION_MODE_ON_CHANGE (watch)
are now mutually exclusive.
Prevent invalid NodePath from being added to the config.
Optimize the replication config loading by composing the lists on
demand.
Allows synchronizing (sub-)resource properties, transform components,
etc. by using subnames.
As an example, `.:transform.x` will only synchronize the `x` component
of the root transform instead of the whole transform.
This can also be used to synchronize a resource own properties, as long
as they are synchronizable (i.e. the property itself is not an Object,
RID, or Callable).
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
A number of early continue cases applied the packet-provided `size`
without validation, allowing large uint32_t values to be treated as
negative offsets and leading to segfaults.
Now, we validate `size` against the buffer length immediately to avoid a
crash.
This could be triggered by receiving sync data for a synchronizer who's
root node had just been removed, since the code path that checked for
unusable sync state failed to advance the offset. Thus the next read
could interpret part of the payload as such an invalid `size`.
Now, we properly advance the read offset in that case (and raise a
better error).
The connection used to happen during enter_tree, but this was causing
issues when setting the spawnable scenes from code.
The spawner now connects/disconnects to the signal during
add_spawnable_scene/clear_spawnable_scenes if the node is inside tree
and has a valid spawn_path.