Set parent scope in state initialization

This commit is contained in:
Dave Palais 2024-03-07 14:00:27 -05:00
parent 41dafe642a
commit 653bf13a7d
1 changed files with 1 additions and 5 deletions

View File

@ -197,11 +197,7 @@ void LimboHSM::initialize(Node *p_agent, const Ref<Blackboard> &p_parent_scope)
ERR_FAIL_COND(p_agent == nullptr);
ERR_FAIL_COND_MSG(!is_root(), "LimboHSM: initialize() must be called on the root HSM.");
if (!p_parent_scope.is_null()) {
blackboard->set_parent(p_parent_scope);
}
_initialize(p_agent, nullptr);
_initialize(p_agent, p_parent_scope);
if (initial_state == nullptr) {
initial_state = Object::cast_to<LimboState>(get_child(0));