Clearly deprecate sync too in favor of remotesync.

NOTE: This changes the RPC_MODE_* enum values.
Games should be re-exported. GDNative rebuilt.
This commit is contained in:
Fabio Alessandrelli
2018-09-14 23:10:12 +02:00
parent d6b31daec6
commit 1e9b46d687
10 changed files with 29 additions and 32 deletions
+3 -7
View File
@@ -45,8 +45,7 @@ _FORCE_INLINE_ bool _should_call_local(MultiplayerAPI::RPCMode mode, bool is_mas
} break;
case MultiplayerAPI::RPC_MODE_REMOTESYNC:
case MultiplayerAPI::RPC_MODE_MASTERSYNC:
case MultiplayerAPI::RPC_MODE_PUPPETSYNC:
case MultiplayerAPI::RPC_MODE_SYNC: {
case MultiplayerAPI::RPC_MODE_PUPPETSYNC: {
//call it, sync always results in call
return true;
} break;
@@ -68,11 +67,8 @@ _FORCE_INLINE_ bool _can_call_mode(Node *p_node, MultiplayerAPI::RPCMode mode, i
case MultiplayerAPI::RPC_MODE_DISABLED: {
return false;
} break;
case MultiplayerAPI::RPC_MODE_REMOTE: {
return true;
} break;
case MultiplayerAPI::RPC_MODE_REMOTESYNC:
case MultiplayerAPI::RPC_MODE_SYNC: {
case MultiplayerAPI::RPC_MODE_REMOTE:
case MultiplayerAPI::RPC_MODE_REMOTESYNC: {
return true;
} break;
case MultiplayerAPI::RPC_MODE_MASTERSYNC:
+2 -2
View File
@@ -91,11 +91,11 @@ public:
RPC_MODE_DISABLED, // No rpc for this method, calls to this will be blocked (default)
RPC_MODE_REMOTE, // Using rpc() on it will call method / set property in all remote peers
RPC_MODE_SYNC, // Using rpc() on it will call method / set property in all remote peers and locally
RPC_MODE_MASTER, // Using rpc() on it will call method on wherever the master is, be it local or remote
RPC_MODE_PUPPET, // Using rpc() on it will call method for all puppets
RPC_MODE_SLAVE = RPC_MODE_PUPPET, // Deprecated, same as puppet
RPC_MODE_REMOTESYNC, // Same as RPC_MODE_SYNC, compatibility
RPC_MODE_REMOTESYNC, // Using rpc() on it will call method / set property in all remote peers and locally
RPC_MODE_SYNC = RPC_MODE_REMOTESYNC, // Deprecated. Same as RPC_MODE_REMOTESYNC
RPC_MODE_MASTERSYNC, // Using rpc() on it will call method / set property in the master peer and locally
RPC_MODE_PUPPETSYNC, // Using rpc() on it will call method / set property in all puppets peers and locally
};