Fix BTState setup
This commit is contained in:
parent
68a9492f3d
commit
5f5b62a4ea
|
@ -53,7 +53,7 @@ void BTState::_setup() {
|
||||||
ERR_FAIL_COND_MSG(behavior_tree.is_null(), "BTState: BehaviorTree is not assigned.");
|
ERR_FAIL_COND_MSG(behavior_tree.is_null(), "BTState: BehaviorTree is not assigned.");
|
||||||
Node *scene_root = get_owner();
|
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).");
|
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.");
|
ERR_FAIL_COND_MSG(bt_instance.is_null(), "BTState: Initialization failed - can't instantiate behavior tree.");
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
|
Loading…
Reference in New Issue