MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / GDScriptRPCCallable

Method GDScriptRPCCallable

modules/gdscript/gdscript_rpc_callable.cpp:94–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94GDScriptRPCCallable::GDScriptRPCCallable(Object *p_object, const StringName &p_method) {
95 ERR_FAIL_NULL(p_object);
96 object = p_object;
97 method = p_method;
98 h = method.hash();
99 h = hash_murmur3_one_64(object->get_instance_id(), h);
100 node = Object::cast_to<Node>(object);
101 ERR_FAIL_NULL_MSG(node, "RPC can only be defined on class that extends Node.");
102}
103
104Error GDScriptRPCCallable::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
105 if (unlikely(!node)) {

Callers

nothing calls this directly

Calls 3

hash_murmur3_one_64Function · 0.85
hashMethod · 0.45
get_instance_idMethod · 0.45

Tested by

no test coverage detected