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.
We want our spawns to be notified after ready, but we need to notify
them in the order they entered tree, so that nested spawners can be used
during "ready" (instead of having to await a frame).
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).
Fixes#59899
Renamed to "spawn_function".
Allow both custom spawn and auto spawn list to co-exist.
This makes it possible to implement custom spawn without being forced to
attach a script to MultiplayerSpawner directly.
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
Adds a OfflineMultiplayerPeer class which behaves like a server with no
connected peers.
Use OfflineMultiplayerPeer as default for SceneMultiplayer.
This means that the SceneTree will act as the multiplayer authority by
default.
Calls to is_server will return true, and calls to get_unique_id will
return TARGET_PEER_SERVER.
Implemented using MultiplayerSynchronizers.
If you didn't use the synchronizer visibility features, nothing changes.
If you were using visibility, RPCs to broadcast should now behave as
expected in most configurations (i.e. by sending the RPC to _visible_
peers).
If you want to limit the visibility of RPCs for a node, add a
synchronizer for it, and configure the visibility via
"set_visibility_for" or by adding a visibility filter.
Fix RPC profiler and add average RPC size.
Improve bandwidth debugger to account for all multiplayer traffic
(excluding the lower level peer transformations).
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.