mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
Refactor RPCMode enum and checks
This commit is contained in:
parent
a71b0830ab
commit
9de4ffde61
25 changed files with 217 additions and 328 deletions
|
|
@ -1967,11 +1967,11 @@ Ref<Script> VisualScriptInstance::get_script() const {
|
|||
return script;
|
||||
}
|
||||
|
||||
ScriptInstance::RPCMode VisualScriptInstance::get_rpc_mode(const StringName &p_method) const {
|
||||
MultiplayerAPI::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 RPC_MODE_DISABLED;
|
||||
return MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
if (E->get().function_id >= 0 && E->get().nodes.has(E->get().function_id)) {
|
||||
|
|
@ -1983,12 +1983,12 @@ ScriptInstance::RPCMode VisualScriptInstance::get_rpc_mode(const StringName &p_m
|
|||
}
|
||||
}
|
||||
|
||||
return RPC_MODE_DISABLED;
|
||||
return MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
ScriptInstance::RPCMode VisualScriptInstance::get_rset_mode(const StringName &p_variable) const {
|
||||
MultiplayerAPI::RPCMode VisualScriptInstance::get_rset_mode(const StringName &p_variable) const {
|
||||
|
||||
return RPC_MODE_DISABLED;
|
||||
return MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_owner) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue