From 24a949ea1154a2298e6898c53fdb75178affe098 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 1 Oct 2021 10:43:22 +0200 Subject: [Net] Rename RPC constants and annotation arguments. any -> any_peer sync -> call_local ordered -> unreliable_ordered Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED --- core/core_constants.cpp | 4 ++-- core/multiplayer/multiplayer.h | 4 ++-- core/multiplayer/rpc_manager.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/core_constants.cpp b/core/core_constants.cpp index 721e5ae622..b2d5a8fdf1 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -613,11 +613,11 @@ void register_global_constants() { // rpc BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_DISABLED", Multiplayer::RPC_MODE_DISABLED); - BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_ANY", Multiplayer::RPC_MODE_ANY); + BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_ANY_PEER", Multiplayer::RPC_MODE_ANY_PEER); BIND_CORE_ENUM_CONSTANT_CUSTOM("RPC_MODE_AUTH", Multiplayer::RPC_MODE_AUTHORITY); BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_UNRELIABLE", Multiplayer::TRANSFER_MODE_UNRELIABLE); - BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_ORDERED", Multiplayer::TRANSFER_MODE_ORDERED); + BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_UNRELIABLE_ORDERED", Multiplayer::TRANSFER_MODE_UNRELIABLE_ORDERED); BIND_CORE_ENUM_CONSTANT_CUSTOM("TRANSFER_MODE_RELIABLE", Multiplayer::TRANSFER_MODE_RELIABLE); BIND_CORE_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL); diff --git a/core/multiplayer/multiplayer.h b/core/multiplayer/multiplayer.h index 00c81d3c9a..31b7bf0043 100644 --- a/core/multiplayer/multiplayer.h +++ b/core/multiplayer/multiplayer.h @@ -39,13 +39,13 @@ namespace Multiplayer { enum TransferMode { TRANSFER_MODE_UNRELIABLE, - TRANSFER_MODE_ORDERED, + TRANSFER_MODE_UNRELIABLE_ORDERED, TRANSFER_MODE_RELIABLE }; enum RPCMode { RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default) - RPC_MODE_ANY, // Any peer can call this RPC + RPC_MODE_ANY_PEER, // Any peer can call this RPC RPC_MODE_AUTHORITY, // / Only the node's multiplayer authority (server by default) can call this RPC }; diff --git a/core/multiplayer/rpc_manager.cpp b/core/multiplayer/rpc_manager.cpp index 915571375e..20ab7a25bb 100644 --- a/core/multiplayer/rpc_manager.cpp +++ b/core/multiplayer/rpc_manager.cpp @@ -99,7 +99,7 @@ _FORCE_INLINE_ bool _can_call_mode(Node *p_node, Multiplayer::RPCMode mode, int case Multiplayer::RPC_MODE_DISABLED: { return false; } break; - case Multiplayer::RPC_MODE_ANY: { + case Multiplayer::RPC_MODE_ANY_PEER: { return true; } break; case Multiplayer::RPC_MODE_AUTHORITY: { -- cgit v1.2.3