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 /core/script_language.h | |
parent | d0b62ce1558766134ea2fc6bcf912e837d0ae40b (diff) | |
download | redot-engine-4c69a495c948b1698a1634b506bf660bd49cdd76.tar.gz |
Revert "RPCMode refactor, more sync modes"
Diffstat (limited to 'core/script_language.h')
-rw-r--r-- | core/script_language.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/script_language.h b/core/script_language.h index ad66fc5528..b4c55cac9e 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -31,7 +31,6 @@ #ifndef SCRIPT_LANGUAGE_H #define SCRIPT_LANGUAGE_H -#include "io/multiplayer_api.h" #include "map.h" #include "pair.h" #include "resource.h" @@ -158,8 +157,16 @@ public: virtual bool is_placeholder() const { return false; } - virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const = 0; - virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const = 0; + enum RPCMode { + RPC_MODE_DISABLED, + RPC_MODE_REMOTE, + RPC_MODE_SYNC, + RPC_MODE_MASTER, + RPC_MODE_SLAVE, + }; + + virtual RPCMode get_rpc_mode(const StringName &p_method) const = 0; + virtual RPCMode get_rset_mode(const StringName &p_variable) const = 0; virtual ScriptLanguage *get_language() = 0; virtual ~ScriptInstance(); @@ -325,8 +332,8 @@ public: virtual bool is_placeholder() const { return true; } - virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const { return MultiplayerAPI::RPC_MODE_DISABLED; } - virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const { return MultiplayerAPI::RPC_MODE_DISABLED; } + virtual RPCMode get_rpc_mode(const StringName &p_method) const { return RPC_MODE_DISABLED; } + virtual RPCMode get_rset_mode(const StringName &p_variable) const { return RPC_MODE_DISABLED; } PlaceHolderScriptInstance(ScriptLanguage *p_language, Ref<Script> p_script, Object *p_owner); ~PlaceHolderScriptInstance(); |