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/visual_script | |
parent | d0b62ce1558766134ea2fc6bcf912e837d0ae40b (diff) |
Revert "RPCMode refactor, more sync modes"
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 10 | ||||
-rw-r--r-- | modules/visual_script/visual_script.h | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 8 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.h | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 9331092171..318fb7fb9c 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -1971,11 +1971,11 @@ Ref<Script> VisualScriptInstance::get_script() const { return script; } -MultiplayerAPI::RPCMode VisualScriptInstance::get_rpc_mode(const StringName &p_method) const { +ScriptInstance::RPCMode VisualScriptInstance::get_rpc_mode(const StringName &p_method) const { const Map<StringName, VisualScript::Function>::Element *E = script->functions.find(p_method); if (!E) { - return MultiplayerAPI::RPC_MODE_DISABLED; + return RPC_MODE_DISABLED; } if (E->get().function_id >= 0 && E->get().nodes.has(E->get().function_id)) { @@ -1987,12 +1987,12 @@ MultiplayerAPI::RPCMode VisualScriptInstance::get_rpc_mode(const StringName &p_m } } - return MultiplayerAPI::RPC_MODE_DISABLED; + return RPC_MODE_DISABLED; } -MultiplayerAPI::RPCMode VisualScriptInstance::get_rset_mode(const StringName &p_variable) const { +ScriptInstance::RPCMode VisualScriptInstance::get_rset_mode(const StringName &p_variable) const { - return MultiplayerAPI::RPC_MODE_DISABLED; + return RPC_MODE_DISABLED; } void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_owner) { diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index aaa6dfea11..a15360ad39 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -433,8 +433,8 @@ public: virtual ScriptLanguage *get_language(); - virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const; - virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const; + virtual RPCMode get_rpc_mode(const StringName &p_method) const; + virtual RPCMode get_rset_mode(const StringName &p_variable) const; VisualScriptInstance(); ~VisualScriptInstance(); diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 8b7b809ec0..4803f29519 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -93,7 +93,7 @@ bool VisualScriptFunction::_set(const StringName &p_name, const Variant &p_value } if (p_name == "rpc/mode") { - rpc_mode = MultiplayerAPI::RPCMode(int(p_value)); + rpc_mode = ScriptInstance::RPCMode(int(p_value)); return true; } @@ -267,11 +267,11 @@ int VisualScriptFunction::get_argument_count() const { return arguments.size(); } -void VisualScriptFunction::set_rpc_mode(MultiplayerAPI::RPCMode p_mode) { +void VisualScriptFunction::set_rpc_mode(ScriptInstance::RPCMode p_mode) { rpc_mode = p_mode; } -MultiplayerAPI::RPCMode VisualScriptFunction::get_rpc_mode() const { +ScriptInstance::RPCMode VisualScriptFunction::get_rpc_mode() const { return rpc_mode; } @@ -319,7 +319,7 @@ VisualScriptFunction::VisualScriptFunction() { stack_size = 256; stack_less = false; sequenced = true; - rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED; + rpc_mode = ScriptInstance::RPC_MODE_DISABLED; } void VisualScriptFunction::set_stack_less(bool p_enable) { diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h index 9bfbd46e47..a0bc35dd92 100644 --- a/modules/visual_script/visual_script_nodes.h +++ b/modules/visual_script/visual_script_nodes.h @@ -46,7 +46,7 @@ class VisualScriptFunction : public VisualScriptNode { bool stack_less; int stack_size; - MultiplayerAPI::RPCMode rpc_mode; + ScriptInstance::RPCMode rpc_mode; bool sequenced; protected: @@ -93,8 +93,8 @@ public: void set_return_type(Variant::Type p_type); Variant::Type get_return_type() const; - void set_rpc_mode(MultiplayerAPI::RPCMode p_mode); - MultiplayerAPI::RPCMode get_rpc_mode() const; + void set_rpc_mode(ScriptInstance::RPCMode p_mode); + ScriptInstance::RPCMode get_rpc_mode() const; virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance); |