summaryrefslogtreecommitdiffstats
path: root/modules/multiplayer/multiplayer_synchronizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Instantiate a replication config on synchronizer creationHakim2024-06-201-1/+1
|
* Use Core/Scene stringnames consistentlykobewi2024-05-131-1/+1
|
* Fix node config warning not updating for Multiplayer{Spawner,Synchronizer}Haoyu Qiu2024-03-241-0/+1
|
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-2/+2
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Update Node::get_configuration_warnings signatureRedMser2024-02-081-2/+2
|
* [MP] Fix remote net ID cleanupFabio Alessandrelli2024-01-141-1/+1
| | | | | | | | | 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).
* Merge pull request #83279 from Faless/mp/fix_delta_indexedRémi Verschelde2023-10-131-1/+1
|\ | | | | | | [MP] Fix "on change" indexed properties
| * [MP] Fix "on change" indexed propertiesFabio Alessandrelli2023-10-131-1/+1
| | | | | | | | Watchers were still using Object::get instead of Object::get_indexed.
* | [MP] Fix synchronizer init and resetFabio Alessandrelli2023-10-131-7/+12
|/ | | | | | | | 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.
* [MP] Optimize internal SceneReplicationConfig accessFabio Alessandrelli2023-10-101-0/+4
| | | | Use direct pointer addressing to avoid unnecessary refs/unrefs
* [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-261-5/+5
|
* [MP] Use get/set indexed in MultiplayerSynchronizerFabio Alessandrelli2023-07-141-2/+2
| | | | | | | | | | | | 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).
* [MP] Fix delta variables index decoding.Fabio Alessandrelli2023-06-261-2/+1
|
* [MP] Implement "watched" properties.Fabio Alessandrelli2023-05-241-10/+103
| | | | | Checked at "delta_interval" (default = every frame), synchronized (reliably) if changes are detected.
* [MP] Add a "synchronized" signal to MultiplayerSynchronized.Fabio Alessandrelli2023-02-201-0/+1
| | | | | Emitted upon receiving a valid sync packet after setting the variables state.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Fix MultiplayerSynchronizer::update_outbound_sync_time when ↵Wei Guo2022-10-231-0/+4
| | | | replication_interval is not 0
* [MP] Allow multiple synchronizers per node.Fabio Alessandrelli2022-10-031-5/+41
| | | | | | | | | | | | | | | | The same node can now be controlled by multiple synchronizers at once. Spawn visibility is composed in OR across multiple synchronizers (i.e. if any synchronizer is visible to the peer, the object will be spawned). Synchronizers controlling spawned nodes can now have a different authority then the one spawning the node, in that case, the spawn variables for that specific synchronizer are simply ignored (other synchronizers with the same authority of the spawner will correctly synchronize variables on spawn). The SceneReplicationState class has been completly removed, since it was bloating the implementation, the state is now simply stored in the SceneReplicationInterface.
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* [MP] Add warnings to spawner and synchronizer.Fabio Alessandrelli2022-09-171-0/+10
| | | | | | | | | | | MultiplayerSpawner: - When spawn_path is invalid. - When the auto spawn list is empty and _spawn_custom is not overridden. Note: We remove the warning for placeholder scripts since there's no way of knowing if they have a certain method. MultiplayerSynchronizer: - When root_path is invalid.
* Remove Signal connect bindsJuan Linietsky2022-07-291-1/+1
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-261-0/+304
- 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.