summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-19 15:20:25 +0200
committerGitHub <noreply@github.com>2021-07-19 15:20:25 +0200
commit855c7c7414a2f29cd420e8dd654a4630226bcd50 (patch)
tree343caeb7b32ef068f50a69e91dad2a8aefe681fb /core/io
parent54b598ffe4f1ba5cc55c947a2cb5192829770088 (diff)
parent6631f66c2a9d54dc80d57df60376c84ce1252d08 (diff)
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
Diffstat (limited to 'core/io')
-rw-r--r--core/io/multiplayer_api.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp
index 9f92388196..0745757d48 100644
--- a/core/io/multiplayer_api.cpp
+++ b/core/io/multiplayer_api.cpp
@@ -941,7 +941,7 @@ void MultiplayerAPI::_send_rpc(Node *p_from, int p_to, uint16_t p_rpc_id, const
void MultiplayerAPI::_add_peer(int p_id) {
connected_peers.insert(p_id);
path_get_cache.insert(p_id, PathGetCache());
- emit_signal("network_peer_connected", p_id);
+ emit_signal(SNAME("network_peer_connected"), p_id);
}
void MultiplayerAPI::_del_peer(int p_id) {
@@ -956,19 +956,19 @@ void MultiplayerAPI::_del_peer(int p_id) {
PathSentCache *psc = path_send_cache.getptr(E->get());
psc->confirmed_peers.erase(p_id);
}
- emit_signal("network_peer_disconnected", p_id);
+ emit_signal(SNAME("network_peer_disconnected"), p_id);
}
void MultiplayerAPI::_connected_to_server() {
- emit_signal("connected_to_server");
+ emit_signal(SNAME("connected_to_server"));
}
void MultiplayerAPI::_connection_failed() {
- emit_signal("connection_failed");
+ emit_signal(SNAME("connection_failed"));
}
void MultiplayerAPI::_server_disconnected() {
- emit_signal("server_disconnected");
+ emit_signal(SNAME("server_disconnected"));
}
void MultiplayerAPI::rpcp(Node *p_node, int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount) {
@@ -1059,7 +1059,7 @@ void MultiplayerAPI::_process_raw(int p_from, const uint8_t *p_packet, int p_pac
uint8_t *w = out.ptrw();
memcpy(&w[0], &p_packet[1], len);
}
- emit_signal("network_peer_packet", p_from, out);
+ emit_signal(SNAME("network_peer_packet"), p_from, out);
}
int MultiplayerAPI::get_network_unique_id() const {