From 5f5b62a4eae62a1bb7c5966bf05794e3f1ae9af1 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sat, 3 Aug 2024 14:17:26 +0200 Subject: [PATCH] Fix BTState setup --- 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 1457f00..9620687 100644 --- a/bt/bt_state.cpp +++ b/bt/bt_state.cpp @@ -53,7 +53,7 @@ void BTState::_setup() { ERR_FAIL_COND_MSG(behavior_tree.is_null(), "BTState: BehaviorTree is not assigned."); Node *scene_root = get_owner(); ERR_FAIL_NULL_MSG(scene_root, "BTState: Initialization failed - can't get scene root (make sure the BTState's owner property is set)."); - bt_instance = behavior_tree->instantiate(get_agent(), get_blackboard(), scene_root); + bt_instance = behavior_tree->instantiate(get_agent(), get_blackboard(), this); ERR_FAIL_COND_MSG(bt_instance.is_null(), "BTState: Initialization failed - can't instantiate behavior tree."); #ifdef DEBUG_ENABLED