fix: RepeatUntilFail checks child status after init

This commit is contained in:
Sara Gerretsen 2026-03-18 15:06:58 +01:00
parent bd7936e357
commit fef1e3f8bd

View file

@ -107,10 +107,12 @@ void BehaviourRepeatUntilFail::execute() {
if (get_child_behaviours().is_empty()) {
set_status(Fail);
ERR_FAIL_EDMSG("BehaviourRepeatUntilFail execution with no child");
} else {
} else if (get_status() == Running) {
set_status(get_child_behaviours().get(0)->get_status() == Fail
? Success
: Running);
} else {
set_status(Running);
}
}