fix: RepeatUntilFail checks child status after init
This commit is contained in:
parent
bd7936e357
commit
fef1e3f8bd
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue