From 16ba0418f9db86c36aed2065554309a416940d64 Mon Sep 17 00:00:00 2001 From: Sara Date: Sat, 14 Mar 2026 22:16:14 +0100 Subject: [PATCH] feat: failed leaf nodes continue processing --- behaviour_tree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/behaviour_tree.cpp b/behaviour_tree.cpp index 5b944830c7f..78bd209fcae 100644 --- a/behaviour_tree.cpp +++ b/behaviour_tree.cpp @@ -46,8 +46,9 @@ bool BehaviourTree::execute_next() { } if (this->current->get_parent() != next) { next->enter(); + next->execute(); } this->current = next; - return cast_to(this->current); + return cast_to(this->current) || this->current->get_status() == BehaviourNode::Fail; } }