You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[MP] Allow multiple synchronizers per node.
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.
This commit is contained in:
@@ -53,6 +53,11 @@ private:
|
||||
HashSet<Callable> visibility_filters;
|
||||
HashSet<int> peer_visibility;
|
||||
|
||||
ObjectID root_node_cache;
|
||||
uint64_t last_sync_msec = 0;
|
||||
uint16_t last_inbound_sync = 0;
|
||||
uint32_t net_id = 0;
|
||||
|
||||
static Object *_get_prop_target(Object *p_obj, const NodePath &p_prop);
|
||||
void _start();
|
||||
void _stop();
|
||||
@@ -66,11 +71,19 @@ public:
|
||||
static Error get_state(const List<NodePath> &p_properties, Object *p_obj, Vector<Variant> &r_variant, Vector<const Variant *> &r_variant_ptrs);
|
||||
static Error set_state(const List<NodePath> &p_properties, Object *p_obj, const Vector<Variant> &p_state);
|
||||
|
||||
void reset();
|
||||
Node *get_root_node();
|
||||
|
||||
uint32_t get_net_id() const;
|
||||
void set_net_id(uint32_t p_net_id);
|
||||
|
||||
bool update_outbound_sync_time(uint64_t p_msec);
|
||||
bool update_inbound_sync_time(uint16_t p_network_time);
|
||||
|
||||
PackedStringArray get_configuration_warnings() const override;
|
||||
|
||||
void set_replication_interval(double p_interval);
|
||||
double get_replication_interval() const;
|
||||
uint64_t get_replication_interval_msec() const;
|
||||
|
||||
void set_replication_config(Ref<SceneReplicationConfig> p_config);
|
||||
Ref<SceneReplicationConfig> get_replication_config();
|
||||
|
||||
Reference in New Issue
Block a user