diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-05-29 11:47:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-29 11:47:52 +0200 |
commit | 4c69a495c948b1698a1634b506bf660bd49cdd76 (patch) | |
tree | 76f810cefb7542fc4e3040d52810899a5e4ea40c /modules/gdnative/pluginscript/pluginscript_script.cpp | |
parent | d0b62ce1558766134ea2fc6bcf912e837d0ae40b (diff) |
Revert "RPCMode refactor, more sync modes"
Diffstat (limited to 'modules/gdnative/pluginscript/pluginscript_script.cpp')
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index eb2e7903e5..5ae7926f1b 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -245,9 +245,9 @@ Error PluginScript::reload(bool p_keep_state) { // rpc_mode is passed as an optional field and is not part of MethodInfo Variant var = v["rpc_mode"]; if (var == Variant()) { - _methods_rpc_mode[mi.name] = MultiplayerAPI::RPC_MODE_DISABLED; + _methods_rpc_mode[mi.name] = ScriptInstance::RPC_MODE_DISABLED; } else { - _methods_rpc_mode[mi.name] = MultiplayerAPI::RPCMode(int(var)); + _methods_rpc_mode[mi.name] = ScriptInstance::RPCMode(int(var)); } } Array *signals = (Array *)&manifest.signals; @@ -265,9 +265,9 @@ Error PluginScript::reload(bool p_keep_state) { // rset_mode is passed as an optional field and is not part of PropertyInfo Variant var = v["rset_mode"]; if (var == Variant()) { - _methods_rpc_mode[pi.name] = MultiplayerAPI::RPC_MODE_DISABLED; + _methods_rpc_mode[pi.name] = ScriptInstance::RPC_MODE_DISABLED; } else { - _methods_rpc_mode[pi.name] = MultiplayerAPI::RPCMode(int(var)); + _methods_rpc_mode[pi.name] = ScriptInstance::RPCMode(int(var)); } } // Manifest's attributes must be explicitly freed @@ -402,23 +402,23 @@ int PluginScript::get_member_line(const StringName &p_member) const { return -1; } -MultiplayerAPI::RPCMode PluginScript::get_rpc_mode(const StringName &p_method) const { - ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED); - const Map<StringName, MultiplayerAPI::RPCMode>::Element *e = _methods_rpc_mode.find(p_method); +ScriptInstance::RPCMode PluginScript::get_rpc_mode(const StringName &p_method) const { + ASSERT_SCRIPT_VALID_V(ScriptInstance::RPC_MODE_DISABLED); + const Map<StringName, ScriptInstance::RPCMode>::Element *e = _methods_rpc_mode.find(p_method); if (e != NULL) { return e->get(); } else { - return MultiplayerAPI::RPC_MODE_DISABLED; + return ScriptInstance::RPC_MODE_DISABLED; } } -MultiplayerAPI::RPCMode PluginScript::get_rset_mode(const StringName &p_variable) const { - ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED); - const Map<StringName, MultiplayerAPI::RPCMode>::Element *e = _variables_rset_mode.find(p_variable); +ScriptInstance::RPCMode PluginScript::get_rset_mode(const StringName &p_variable) const { + ASSERT_SCRIPT_VALID_V(ScriptInstance::RPC_MODE_DISABLED); + const Map<StringName, ScriptInstance::RPCMode>::Element *e = _variables_rset_mode.find(p_variable); if (e != NULL) { return e->get(); } else { - return MultiplayerAPI::RPC_MODE_DISABLED; + return ScriptInstance::RPC_MODE_DISABLED; } } |