summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-05-29 11:47:52 +0200
committerGitHub <noreply@github.com>2018-05-29 11:47:52 +0200
commit4c69a495c948b1698a1634b506bf660bd49cdd76 (patch)
tree76f810cefb7542fc4e3040d52810899a5e4ea40c /modules/mono/csharp_script.cpp
parentd0b62ce1558766134ea2fc6bcf912e837d0ae40b (diff)
downloadredot-engine-4c69a495c948b1698a1634b506bf660bd49cdd76.tar.gz
Revert "RPCMode refactor, more sync modes"
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r--modules/mono/csharp_script.cpp32
1 files changed, 13 insertions, 19 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 3cfc376317..24292b77ed 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1310,27 +1310,21 @@ bool CSharpInstance::refcount_decremented() {
return ref_dying;
}
-MultiplayerAPI::RPCMode CSharpInstance::_member_get_rpc_mode(GDMonoClassMember *p_member) const {
+ScriptInstance::RPCMode CSharpInstance::_member_get_rpc_mode(GDMonoClassMember *p_member) const {
if (p_member->has_attribute(CACHED_CLASS(RemoteAttribute)))
- return MultiplayerAPI::RPC_MODE_REMOTE;
+ return RPC_MODE_REMOTE;
if (p_member->has_attribute(CACHED_CLASS(SyncAttribute)))
- return MultiplayerAPI::RPC_MODE_SYNC;
+ return RPC_MODE_SYNC;
if (p_member->has_attribute(CACHED_CLASS(MasterAttribute)))
- return MultiplayerAPI::RPC_MODE_MASTER;
+ return RPC_MODE_MASTER;
if (p_member->has_attribute(CACHED_CLASS(SlaveAttribute)))
- return MultiplayerAPI::RPC_MODE_SLAVE;
- if (p_member->has_attribute(CACHED_CLASS(RemoteSyncAttribute)))
- return MultiplayerAPI::RPC_MODE_REMOTESYNC;
- if (p_member->has_attribute(CACHED_CLASS(MasterSyncAttribute)))
- return MultiplayerAPI::RPC_MODE_MASTERSYNC;
- if (p_member->has_attribute(CACHED_CLASS(SlaveSyncAttribute)))
- return MultiplayerAPI::RPC_MODE_SLAVESYNC;
+ return RPC_MODE_SLAVE;
- return MultiplayerAPI::RPC_MODE_DISABLED;
+ return RPC_MODE_DISABLED;
}
-MultiplayerAPI::RPCMode CSharpInstance::get_rpc_mode(const StringName &p_method) const {
+ScriptInstance::RPCMode CSharpInstance::get_rpc_mode(const StringName &p_method) const {
GDMonoClass *top = script->script_class;
@@ -1343,10 +1337,10 @@ MultiplayerAPI::RPCMode CSharpInstance::get_rpc_mode(const StringName &p_method)
top = top->get_parent_class();
}
- return MultiplayerAPI::RPC_MODE_DISABLED;
+ return RPC_MODE_DISABLED;
}
-MultiplayerAPI::RPCMode CSharpInstance::get_rset_mode(const StringName &p_variable) const {
+ScriptInstance::RPCMode CSharpInstance::get_rset_mode(const StringName &p_variable) const {
GDMonoClass *top = script->script_class;
@@ -1364,7 +1358,7 @@ MultiplayerAPI::RPCMode CSharpInstance::get_rset_mode(const StringName &p_variab
top = top->get_parent_class();
}
- return MultiplayerAPI::RPC_MODE_DISABLED;
+ return RPC_MODE_DISABLED;
}
void CSharpInstance::notification(int p_notification) {
@@ -1973,15 +1967,15 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) {
return NULL;
#endif
}
-
+
if (!script_class) {
if (GDMono::get_singleton()->get_project_assembly() == NULL) {
// The project assembly is not loaded
ERR_EXPLAIN("Cannot instance script because the project assembly is not loaded. Script: " + get_path());
ERR_FAIL_V(NULL);
}
-
- // The project assembly is loaded, but the class could not found
+
+ // The project assembly is loaded, but the class could not found
ERR_EXPLAIN("Cannot instance script because the class '" + name + "' could not be found. Script: " + get_path());
ERR_FAIL_V(NULL);
}