mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Merge pull request #44104 from nekomatata/coroutine-await-fix
Fix error when calling coroutine with await in _ready
This commit is contained in:
commit
c17413f159
4 changed files with 23 additions and 2 deletions
|
@ -899,6 +899,17 @@ void GDScriptByteCodeGenerator::write_call_self(const Address &p_target, const S
|
|||
append(p_function_name);
|
||||
}
|
||||
|
||||
void GDScriptByteCodeGenerator::write_call_self_async(const Address &p_target, const StringName &p_function_name, const Vector<Address> &p_arguments) {
|
||||
append(GDScriptFunction::OPCODE_CALL_ASYNC, 2 + p_arguments.size());
|
||||
for (int i = 0; i < p_arguments.size(); i++) {
|
||||
append(p_arguments[i]);
|
||||
}
|
||||
append(GDScriptFunction::ADDR_TYPE_SELF << GDScriptFunction::ADDR_BITS);
|
||||
append(p_target);
|
||||
append(p_arguments.size());
|
||||
append(p_function_name);
|
||||
}
|
||||
|
||||
void GDScriptByteCodeGenerator::write_call_script_function(const Address &p_target, const Address &p_base, const StringName &p_function_name, const Vector<Address> &p_arguments) {
|
||||
append(p_target.mode == Address::NIL ? GDScriptFunction::OPCODE_CALL : GDScriptFunction::OPCODE_CALL_RETURN, 2 + p_arguments.size());
|
||||
for (int i = 0; i < p_arguments.size(); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue