You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
This commit is contained in:
@@ -90,7 +90,7 @@ bool VisualScriptFunction::_set(const StringName &p_name, const Variant &p_value
|
||||
}
|
||||
|
||||
if (p_name == "rpc/mode") {
|
||||
rpc_mode = Multiplayer::RPCMode(int(p_value));
|
||||
rpc_mode = MultiplayerAPI::RPCMode(int(p_value));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -261,11 +261,11 @@ int VisualScriptFunction::get_argument_count() const {
|
||||
return arguments.size();
|
||||
}
|
||||
|
||||
void VisualScriptFunction::set_rpc_mode(Multiplayer::RPCMode p_mode) {
|
||||
void VisualScriptFunction::set_rpc_mode(MultiplayerAPI::RPCMode p_mode) {
|
||||
rpc_mode = p_mode;
|
||||
}
|
||||
|
||||
Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const {
|
||||
MultiplayerAPI::RPCMode VisualScriptFunction::get_rpc_mode() const {
|
||||
return rpc_mode;
|
||||
}
|
||||
|
||||
@@ -311,14 +311,14 @@ void VisualScriptFunction::reset_state() {
|
||||
stack_size = 256;
|
||||
stack_less = false;
|
||||
sequenced = true;
|
||||
rpc_mode = Multiplayer::RPC_MODE_DISABLED;
|
||||
rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
VisualScriptFunction::VisualScriptFunction() {
|
||||
stack_size = 256;
|
||||
stack_less = false;
|
||||
sequenced = true;
|
||||
rpc_mode = Multiplayer::RPC_MODE_DISABLED;
|
||||
rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
void VisualScriptFunction::set_stack_less(bool p_enable) {
|
||||
|
||||
Reference in New Issue
Block a user