Commit graph

10 commits

Author SHA1 Message Date
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Fabio Alessandrelli
45e8fa10c1 [MP] Fix replication config reload error
Override the `reset_state` method to properly handle reloading the
resource from disk.
2024-03-03 11:13:00 +01:00
Fabio Alessandrelli
711e96edc4 [MP] Make replication mode an enum + optimizations
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.
2023-08-30 15:00:39 +02:00
Fabio Alessandrelli
3860f2e366 [MP] Fix watch properties not being correctly removed 2023-08-27 10:53:04 +02:00
Fabio Alessandrelli
f1e0d50841 [MP] Implement "watched" properties.
Checked at "delta_interval" (default = every frame), synchronized
(reliably) if changes are detected.
2023-05-24 05:21:41 +02:00
Mai Lavelle
74edbdd4bc Fixups to list handling in SceneReplicationConfig
Wrong paths were being inserted leading to duplicates / missed properties.
2023-03-07 09:41:42 -05:00
Fabio Alessandrelli
72f5bbde82 [MP] Fix replication config not updating sync/spawn props from code. 2023-02-23 10:03:19 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Fabio Alessandrelli
ca7d572908 [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.
- RPC configurations are now dictionaries.
- Script.get_rpc_methods renamed to Script.get_rpc_config.
- Node.rpc[_id] and Callable.rpc now return an Error.
- Refactor MultiplayerAPI to allow extension.
- New MultiplayerAPI.rpc method with Array argument (for scripts).
- Move the default MultiplayerAPI implementation to a module.
2022-07-26 09:31:12 +02:00
Renamed from scene/resources/scene_replication_config.cpp (Browse further)