diff options
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index dc0e64fd03..68f2a9473e 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -431,6 +431,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a profile.frame_call_count++; } bool exit_ok = false; + bool yielded = false; #endif #ifdef DEBUG_ENABLED @@ -1323,6 +1324,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a #ifdef DEBUG_ENABLED exit_ok = true; + yielded = true; #endif OPCODE_BREAK; } @@ -1589,8 +1591,6 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GDScriptLanguage::get_singleton()->script_frame_time += time_taken - function_call_time; } - bool yielded = retvalue.is_ref() && Object::cast_to<GDScriptFunctionState>(retvalue); - // Check if this is the last time the function is resuming from yield // Will be true if never yielded as well // When it's the last resume it will postpone the exit from stack, diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index a9f22225a0..99bfdae7ec 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3366,7 +3366,7 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) { return; } - if (!p_class->constant_expressions.empty() || !p_class->subclasses.empty() || !p_class->functions.empty() || !p_class->variables.empty() || p_class->classname_used) { + if (!p_class->constant_expressions.empty() || !p_class->subclasses.empty() || !p_class->functions.empty() || !p_class->variables.empty()) { _set_error("\"extends\" must be used before anything else."); return; |