summaryrefslogtreecommitdiffstats
path: root/modules/multiplayer
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-05-13 16:56:03 +0200
committerkobewi <kobewi4e@gmail.com>2024-05-13 23:41:07 +0200
commit413c11357d039a03a8dca440a01951a637ae936b (patch)
treee96f5b865d7158aa69fcf1e422ffafdb59dc2411 /modules/multiplayer
parentde196227e17126fa18716c4ed8e61108584116dc (diff)
downloadredot-engine-413c11357d039a03a8dca440a01951a637ae936b.tar.gz
Use Core/Scene stringnames consistently
Diffstat (limited to 'modules/multiplayer')
-rw-r--r--modules/multiplayer/multiplayer_spawner.cpp1
-rw-r--r--modules/multiplayer/multiplayer_synchronizer.cpp2
-rw-r--r--modules/multiplayer/scene_cache_interface.cpp1
-rw-r--r--modules/multiplayer/scene_replication_interface.cpp5
4 files changed, 3 insertions, 6 deletions
diff --git a/modules/multiplayer/multiplayer_spawner.cpp b/modules/multiplayer/multiplayer_spawner.cpp
index b871025491..2408d7231b 100644
--- a/modules/multiplayer/multiplayer_spawner.cpp
+++ b/modules/multiplayer/multiplayer_spawner.cpp
@@ -33,7 +33,6 @@
#include "core/io/marshalls.h"
#include "scene/main/multiplayer_api.h"
#include "scene/main/window.h"
-#include "scene/scene_string_names.h"
#ifdef TOOLS_ENABLED
/* This is editor only */
diff --git a/modules/multiplayer/multiplayer_synchronizer.cpp b/modules/multiplayer/multiplayer_synchronizer.cpp
index c2ce500af8..ca3fa43207 100644
--- a/modules/multiplayer/multiplayer_synchronizer.cpp
+++ b/modules/multiplayer/multiplayer_synchronizer.cpp
@@ -343,7 +343,7 @@ void MultiplayerSynchronizer::update_visibility(int p_for_peer) {
#endif
Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr;
if (node && get_multiplayer()->has_multiplayer_peer() && is_multiplayer_authority()) {
- emit_signal(SNAME("visibility_changed"), p_for_peer);
+ emit_signal(SceneStringName(visibility_changed), p_for_peer);
}
}
diff --git a/modules/multiplayer/scene_cache_interface.cpp b/modules/multiplayer/scene_cache_interface.cpp
index 39443029d3..2ea9ce8819 100644
--- a/modules/multiplayer/scene_cache_interface.cpp
+++ b/modules/multiplayer/scene_cache_interface.cpp
@@ -35,7 +35,6 @@
#include "core/io/marshalls.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
-#include "scene/scene_string_names.h"
SceneCacheInterface::NodeCache &SceneCacheInterface::_track(Node *p_node) {
const ObjectID oid = p_node->get_instance_id();
diff --git a/modules/multiplayer/scene_replication_interface.cpp b/modules/multiplayer/scene_replication_interface.cpp
index f1a43a68b9..edc66c876c 100644
--- a/modules/multiplayer/scene_replication_interface.cpp
+++ b/modules/multiplayer/scene_replication_interface.cpp
@@ -35,7 +35,6 @@
#include "core/debugger/engine_debugger.h"
#include "core/io/marshalls.h"
#include "scene/main/node.h"
-#include "scene/scene_string_names.h"
#define MAKE_ROOM(m_amount) \
if (packet_cache.size() < m_amount) \
@@ -236,7 +235,7 @@ Error SceneReplicationInterface::on_replication_start(Object *p_obj, Variant p_c
sync_nodes.insert(sid);
// Update visibility.
- sync->connect("visibility_changed", callable_mp(this, &SceneReplicationInterface::_visibility_changed).bind(sync->get_instance_id()));
+ sync->connect(SceneStringName(visibility_changed), callable_mp(this, &SceneReplicationInterface::_visibility_changed).bind(sync->get_instance_id()));
_update_sync_visibility(0, sync);
if (pending_spawn == p_obj->get_instance_id() && sync->get_multiplayer_authority() == pending_spawn_remote) {
@@ -273,7 +272,7 @@ Error SceneReplicationInterface::on_replication_stop(Object *p_obj, Variant p_co
ERR_FAIL_COND_V(!node || p_config.get_type() != Variant::OBJECT, ERR_INVALID_PARAMETER);
MultiplayerSynchronizer *sync = Object::cast_to<MultiplayerSynchronizer>(p_config.get_validated_object());
ERR_FAIL_NULL_V(sync, ERR_INVALID_PARAMETER);
- sync->disconnect("visibility_changed", callable_mp(this, &SceneReplicationInterface::_visibility_changed));
+ sync->disconnect(SceneStringName(visibility_changed), callable_mp(this, &SceneReplicationInterface::_visibility_changed));
// Untrack synchronizer.
const ObjectID oid = node->get_instance_id();
const ObjectID sid = sync->get_instance_id();