Backport 65910 for Godot 3

(cherry picked from commit 354e656531)
This commit is contained in:
Capital 2024-09-25 12:57:56 -04:00 committed by lawnjelly
parent 4205412c7e
commit af885004f1
3 changed files with 22 additions and 2 deletions

View file

@ -1855,6 +1855,15 @@ void GDScriptFunctionState::_clear_stack() {
}
}
void GDScriptFunctionState::_clear_connections() {
List<Object::Connection> conns;
get_signals_connected_to_this(&conns);
for (List<Object::Connection>::Element *E = conns.front(); E; E = E->next()) {
Object::Connection &c = E->get();
c.source->disconnect(c.signal, c.target, c.method);
}
}
void GDScriptFunctionState::_bind_methods() {
ClassDB::bind_method(D_METHOD("resume", "arg"), &GDScriptFunctionState::resume, DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("is_valid", "extended_check"), &GDScriptFunctionState::is_valid, DEFVAL(false));