Compare commits
12 Commits
eb0dab6f1b
...
9b7832af31
Author | SHA1 | Date |
---|---|---|
|
9b7832af31 | |
|
0566703373 | |
|
e63ae2b085 | |
|
d5a58ad292 | |
|
e95af44185 | |
|
39ebbb4e7a | |
|
e7291a0e3a | |
|
89d4b1c88f | |
|
bf64086d90 | |
|
0584b0401f | |
|
98917a2055 | |
|
10defe21a5 |
|
@ -1,4 +1,4 @@
|
|||
Copyright 2021-2024 Serhii Snitsaruk
|
||||
Copyright (c) 2023-2025 Serhii Snitsaruk and the LimboAI contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_aabb.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_basis.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_bool.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_byte_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_color.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_color_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_dictionary.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_float.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_float32_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_float64_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_int.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_int32_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_int64_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_node.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
Variant BBNode::get_value(Node *p_scene_root, const Ref<Blackboard> &p_blackboard, const Variant &p_default) {
|
||||
ERR_FAIL_NULL_V_MSG(p_scene_root, Variant(), "BBNode: get_value() failed - scene_root is null.");
|
||||
ERR_FAIL_NULL_V_MSG(p_blackboard, Variant(), "BBNode: get_value() failed - blackboard is null.");
|
||||
ERR_FAIL_COND_V_MSG(p_blackboard.is_null(), Variant(), "BBNode: get_value() failed - blackboard is null.");
|
||||
|
||||
Variant val;
|
||||
if (get_value_source() == SAVED_VALUE) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_node.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_param.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_param.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_plane.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_projection.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_quaternion.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_rect2.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_rect2i.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_string.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_string_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_string_name.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_transform2d.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_transform3d.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variant.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variant.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector2.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector2_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector2i.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector3.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector3_array.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector3i.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector4.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_vector4i.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variable.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bb_variable.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* blackboard.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* blackboard.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* blackboard_plan.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -532,7 +532,7 @@ void BlackboardPlan::populate_blackboard(const Ref<Blackboard> &p_blackboard, bo
|
|||
if (has_mapping) {
|
||||
StringName target_var = parent_scope_mapping[p.first];
|
||||
if (target_var != StringName()) {
|
||||
ERR_CONTINUE_MSG(p_blackboard->get_parent() == nullptr, vformat("BlackboardPlan: Cannot link variable %s to parent scope because the parent scope is not set.", LimboUtility::get_singleton()->decorate_var(p.first)));
|
||||
ERR_CONTINUE_MSG(p_blackboard->get_parent().is_null(), vformat("BlackboardPlan: Cannot link variable %s to parent scope because the parent scope is not set.", LimboUtility::get_singleton()->decorate_var(p.first)));
|
||||
p_blackboard->link_var(p.first, p_blackboard->get_parent(), target_var);
|
||||
}
|
||||
} else if (is_bound) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* blackboard_plan.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* behavior_tree.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -78,10 +78,10 @@ void BehaviorTree::copy_other(const Ref<BehaviorTree> &p_other) {
|
|||
}
|
||||
|
||||
Ref<BTInstance> BehaviorTree::instantiate(Node *p_agent, const Ref<Blackboard> &p_blackboard, Node *p_instance_owner, Node *p_custom_scene_root) const {
|
||||
ERR_FAIL_COND_V_MSG(root_task == nullptr, nullptr, "BehaviorTree: Instantiation failed - BT has no valid root task.");
|
||||
ERR_FAIL_COND_V_MSG(root_task.is_null(), nullptr, "BehaviorTree: Instantiation failed - BT has no valid root task.");
|
||||
ERR_FAIL_NULL_V_MSG(p_agent, nullptr, "BehaviorTree: Instantiation failed - agent can't be null.");
|
||||
ERR_FAIL_NULL_V_MSG(p_instance_owner, nullptr, "BehaviorTree: Instantiation failed -- instance owner can't be null.");
|
||||
ERR_FAIL_NULL_V_MSG(p_blackboard, nullptr, "BehaviorTree: Instantiation failed - blackboard can't be null.");
|
||||
ERR_FAIL_COND_V_MSG(p_blackboard.is_null(), nullptr, "BehaviorTree: Instantiation failed - blackboard can't be null.");
|
||||
Node *scene_root = p_custom_scene_root ? p_custom_scene_root : p_instance_owner->get_owner();
|
||||
ERR_FAIL_NULL_V_MSG(scene_root, nullptr, "BehaviorTree: Instantiation failed - unable to establish scene root. This is likely due to the instance owner not being owned by a scene node and custom_scene_root being null.");
|
||||
Ref<BTTask> root_copy = root_task->clone();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* behavior_tree.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_instance.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -25,7 +25,7 @@
|
|||
#endif
|
||||
|
||||
Ref<BTInstance> BTInstance::create(Ref<BTTask> p_root_task, String p_source_bt_path, Node *p_owner_node) {
|
||||
ERR_FAIL_NULL_V(p_root_task, nullptr);
|
||||
ERR_FAIL_COND_V(p_root_task.is_null(), nullptr);
|
||||
ERR_FAIL_NULL_V(p_owner_node, nullptr);
|
||||
Ref<BTInstance> inst;
|
||||
inst.instantiate();
|
||||
|
@ -103,7 +103,7 @@ double BTInstance::_get_mean_update_time_msec_and_reset() {
|
|||
|
||||
void BTInstance::_add_custom_monitor() {
|
||||
ERR_FAIL_NULL(get_owner_node());
|
||||
ERR_FAIL_NULL(root_task);
|
||||
ERR_FAIL_COND(root_task.is_null());
|
||||
ERR_FAIL_NULL(root_task->get_agent());
|
||||
|
||||
if (monitor_id == StringName()) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_instance.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_player.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_player.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_state.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -98,7 +98,7 @@ void BTState::_update(double p_delta) {
|
|||
// Bail out if a transition happened in the meantime.
|
||||
return;
|
||||
}
|
||||
ERR_FAIL_NULL(bt_instance);
|
||||
ERR_FAIL_COND(bt_instance.is_null());
|
||||
BT::Status status = bt_instance->update(p_delta);
|
||||
if (status == BTTask::SUCCESS) {
|
||||
get_root()->dispatch(success_event, Variant());
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_state.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_trigger.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_trigger.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_var.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_check_var.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_set_var.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_set_var.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_action.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_action.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_comment.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -30,7 +30,7 @@ PackedStringArray BTComment::get_configuration_warnings() {
|
|||
if (get_child_count_excluding_comments() > 0) {
|
||||
warnings.append("Can only have other comment tasks as children.");
|
||||
}
|
||||
if (get_parent() == nullptr) {
|
||||
if (get_parent().is_null()) {
|
||||
warnings.append("Can't be the root task.");
|
||||
}
|
||||
return warnings;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_comment.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_composite.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_composite.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_condition.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_condition.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_decorator.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_decorator.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_task.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -163,7 +163,7 @@ void BTTask::set_custom_name(const String &p_name) {
|
|||
|
||||
void BTTask::initialize(Node *p_agent, const Ref<Blackboard> &p_blackboard, Node *p_scene_root) {
|
||||
ERR_FAIL_NULL(p_agent);
|
||||
ERR_FAIL_NULL(p_blackboard);
|
||||
ERR_FAIL_COND(p_blackboard.is_null());
|
||||
ERR_FAIL_NULL(p_scene_root);
|
||||
data.agent = p_agent;
|
||||
data.blackboard = p_blackboard;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_task.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_dynamic_selector.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_dynamic_selector.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_dynamic_sequence.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_dynamic_sequence.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_parallel.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_parallel.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability_selector.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_probability_selector.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_selector.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_selector.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_sequence.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_random_sequence.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_selector.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_selector.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_sequence.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_sequence.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_always_fail.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_always_fail.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_always_succeed.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_always_succeed.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_cooldown.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -80,7 +80,7 @@ void BTCooldown::_chill() {
|
|||
timer->set_time_left(duration);
|
||||
} else {
|
||||
timer = SCENE_TREE()->create_timer(duration, process_pause);
|
||||
ERR_FAIL_NULL(timer);
|
||||
ERR_FAIL_COND(timer.is_null());
|
||||
timer->connect(LW_NAME(timeout), callable_mp(this, &BTCooldown::_on_timeout), CONNECT_ONE_SHOT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_cooldown.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_delay.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_delay.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_for_each.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_for_each.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_invert.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_invert.h
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* bt_new_scope.cpp
|
||||
* =============================================================================
|
||||
* Copyright 2021-2024 Serhii Snitsaruk
|
||||
* Copyright (c) 2023-present Serhii Snitsaruk and the LimboAI contributors.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style
|
||||
* license that can be found in the LICENSE file or at
|
||||
|
@ -32,16 +32,16 @@ void BTNewScope::set_blackboard_plan(const Ref<BlackboardPlan> &p_plan) {
|
|||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void BTNewScope::_set_parent_scope_plan_from_bt() {
|
||||
ERR_FAIL_NULL(get_blackboard_plan());
|
||||
ERR_FAIL_COND(get_blackboard_plan().is_null());
|
||||
Ref<BehaviorTree> bt = get_root()->editor_get_behavior_tree();
|
||||
ERR_FAIL_NULL(bt);
|
||||
ERR_FAIL_COND(bt.is_null());
|
||||
get_blackboard_plan()->set_parent_scope_plan_provider(Callable(bt.ptr(), "get_blackboard_plan"));
|
||||
}
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
void BTNewScope::initialize(Node *p_agent, const Ref<Blackboard> &p_blackboard, Node *p_scene_root) {
|
||||
ERR_FAIL_COND(p_agent == nullptr);
|
||||
ERR_FAIL_COND(p_blackboard == nullptr);
|
||||
ERR_FAIL_COND(p_blackboard.is_null());
|
||||
|
||||
Ref<Blackboard> bb;
|
||||
if (blackboard_plan.is_valid()) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue