From 1400f6fdc444650ebf37c83bb4164e25e641bab1 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 13 May 2018 07:07:56 +0200 Subject: Refactor RPCMode enum and checks --- modules/gdscript/gdscript.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/gdscript/gdscript.cpp') diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 14bdce50ec..33591ac2a9 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1220,7 +1220,7 @@ ScriptLanguage *GDScriptInstance::get_language() { return GDScriptLanguage::get_singleton(); } -GDScriptInstance::RPCMode GDScriptInstance::get_rpc_mode(const StringName &p_method) const { +MultiplayerAPI::RPCMode GDScriptInstance::get_rpc_mode(const StringName &p_method) const { const GDScript *cscript = script.ptr(); @@ -1228,17 +1228,17 @@ GDScriptInstance::RPCMode GDScriptInstance::get_rpc_mode(const StringName &p_met const Map::Element *E = cscript->member_functions.find(p_method); if (E) { - if (E->get()->get_rpc_mode() != RPC_MODE_DISABLED) { + if (E->get()->get_rpc_mode() != MultiplayerAPI::RPC_MODE_DISABLED) { return E->get()->get_rpc_mode(); } } cscript = cscript->_base; } - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } -GDScriptInstance::RPCMode GDScriptInstance::get_rset_mode(const StringName &p_variable) const { +MultiplayerAPI::RPCMode GDScriptInstance::get_rset_mode(const StringName &p_variable) const { const GDScript *cscript = script.ptr(); @@ -1253,7 +1253,7 @@ GDScriptInstance::RPCMode GDScriptInstance::get_rset_mode(const StringName &p_va cscript = cscript->_base; } - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } void GDScriptInstance::reload_members() { -- cgit v1.2.3 From 8e35d937a96399c7fc9dcc3b9cd7344a6a38cfd8 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sat, 26 May 2018 10:30:36 +0200 Subject: New sync keywords in GDScript, NativeScript, Mono --- modules/gdscript/gdscript.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gdscript/gdscript.cpp') diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 33591ac2a9..f23e7854a5 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1769,6 +1769,9 @@ void GDScriptLanguage::get_reserved_words(List *p_words) const { "sync", "master", "slave", + "remotesync", + "mastersync", + "slavesync", 0 }; -- cgit v1.2.3