summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd/gd_mono_cache.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-08-10 20:44:06 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-08-30 00:54:38 +0200
commit64b9f30b9299c023ecbb8d2f0b140e1b48d38014 (patch)
tree2066ff69081df1ba7704557595c0da8c402c8078 /modules/mono/mono_gd/gd_mono_cache.cpp
parent838a449d6466400fdf5b3a9088b850559cc64c8d (diff)
[Net] Rename RPC "puppet" to "auth" (authority). Drop "master".
This commit completely removes the RPC_MODE_MASTER ("master" keyword), and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword). This commit also renames the "Node.[get|set]_network_master" methods to "Node.[get|set]_network_authority". This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY. RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by any puppet peer on the master, while RPC_MODE_PUPPET meant that it would be callable by the master on any puppet. Beside proving to be very confusing to the user (referring to where it could be called instead of who can call it) the RPC_MODE_MASTER is quite useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with the exception that the network master cannot. While this could be useful to check in some case, in such a function you would anyway need to check in code who is the caller via get_rpc_sender_id(), so adding the check there for those rare cases does not warrants a dedicated mode.
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_cache.cpp')
-rw-r--r--modules/mono/mono_gd/gd_mono_cache.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/modules/mono/mono_gd/gd_mono_cache.cpp b/modules/mono/mono_gd/gd_mono_cache.cpp
index 0b36796d98..8b215a66c2 100644
--- a/modules/mono/mono_gd/gd_mono_cache.cpp
+++ b/modules/mono/mono_gd/gd_mono_cache.cpp
@@ -141,7 +141,6 @@ void CachedData::clear_godot_api_cache() {
class_SignalAttribute = nullptr;
class_ToolAttribute = nullptr;
class_RemoteAttribute = nullptr;
- class_MasterAttribute = nullptr;
class_PuppetAttribute = nullptr;
class_GodotMethodAttribute = nullptr;
field_GodotMethodAttribute_methodName = nullptr;
@@ -267,7 +266,6 @@ void update_godot_api_cache() {
CACHE_CLASS_AND_CHECK(SignalAttribute, GODOT_API_CLASS(SignalAttribute));
CACHE_CLASS_AND_CHECK(ToolAttribute, GODOT_API_CLASS(ToolAttribute));
CACHE_CLASS_AND_CHECK(RemoteAttribute, GODOT_API_CLASS(RemoteAttribute));
- CACHE_CLASS_AND_CHECK(MasterAttribute, GODOT_API_CLASS(MasterAttribute));
CACHE_CLASS_AND_CHECK(PuppetAttribute, GODOT_API_CLASS(PuppetAttribute));
CACHE_CLASS_AND_CHECK(GodotMethodAttribute, GODOT_API_CLASS(GodotMethodAttribute));
CACHE_FIELD_AND_CHECK(GodotMethodAttribute, methodName, CACHED_CLASS(GodotMethodAttribute)->get_field("methodName"));