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.
This commit is contained in:
Serhii Snitsaruk 2024-05-15 11:43:31 +02:00
parent a572613001
commit d36f8f1122
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 1 additions and 1 deletions

View File

@ -32,10 +32,10 @@ void BTState::set_behavior_tree(const Ref<BehaviorTree> &p_tree) {
p_tree->connect(LW_NAME(plan_changed), callable_mp(this, &BTState::_update_blackboard_plan)); p_tree->connect(LW_NAME(plan_changed), callable_mp(this, &BTState::_update_blackboard_plan));
} }
behavior_tree = p_tree; behavior_tree = p_tree;
_update_blackboard_plan();
} else { } else {
behavior_tree = p_tree; behavior_tree = p_tree;
} }
_update_blackboard_plan();
} }
void BTState::_update_blackboard_plan() { void BTState::_update_blackboard_plan() {