| 92 | } |
| 93 | |
| 94 | GDScriptRPCCallable::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 | |
| 104 | Error GDScriptRPCCallable::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const { |
| 105 | if (unlikely(!node)) { |
nothing calls this directly
no test coverage detected