From d36f8f1122a3dd3c0b9f980c2ca638c9c7046cfc Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 15 May 2024 11:43:31 +0200 Subject: [PATCH] Fix variables missing from BTState blackboard Non-overridden variables could be missing at runtime in the BTState blackboard due to a bug this commit fixes. --- bt/bt_state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bt/bt_state.cpp b/bt/bt_state.cpp index 1a29f03..dd1c659 100644 --- a/bt/bt_state.cpp +++ b/bt/bt_state.cpp @@ -32,10 +32,10 @@ void BTState::set_behavior_tree(const Ref &p_tree) { p_tree->connect(LW_NAME(plan_changed), callable_mp(this, &BTState::_update_blackboard_plan)); } behavior_tree = p_tree; - _update_blackboard_plan(); } else { behavior_tree = p_tree; } + _update_blackboard_plan(); } void BTState::_update_blackboard_plan() {