summaryrefslogtreecommitdiff
path: root/core/io/multiplayer_replicator.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-08-26 13:35:33 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-08-26 13:35:33 +0100
commit2d2855cd53a6818e258e8ddebc38049fd87726ee (patch)
treea6f9132dd04b0e00e6a55aa379b3308e10bd01ae /core/io/multiplayer_replicator.h
parentb05cb0fd7d7e4a195359d258fabe33d76976a7a9 (diff)
Data structure optimizations as per review.
Diffstat (limited to 'core/io/multiplayer_replicator.h')
-rw-r--r--core/io/multiplayer_replicator.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/io/multiplayer_replicator.h b/core/io/multiplayer_replicator.h
index 6d2618d3df..2630ad7a8a 100644
--- a/core/io/multiplayer_replicator.h
+++ b/core/io/multiplayer_replicator.h
@@ -32,6 +32,8 @@
#define MULTIPLAYER_REPLICATOR_H
#include "core/io/multiplayer_api.h"
+
+#include "core/templates/hash_map.h"
#include "core/variant/typed_array.h"
class MultiplayerReplicator : public Object {
@@ -70,7 +72,7 @@ private:
Vector<uint8_t> packet_cache;
Map<ResourceUID::ID, SceneConfig> replications;
Map<ObjectID, ResourceUID::ID> replicated_nodes;
- Map<ResourceUID::ID, List<ObjectID>> tracked_objects;
+ HashMap<ResourceUID::ID, List<ObjectID>> tracked_objects;
// Encoding
Error _get_state(const List<StringName> &p_properties, const Object *p_obj, List<Variant> &r_variant);