mirror of
https://github.com/gongxh0901/kunpocc-behaviortree.git
synced 2025-12-27 00:58:18 +00:00
修复行为树关键bug
- 修复BehaviorTree.ts中lastOpenNodes的空指针风险 - 修复Ticker.ts中closeNode栈操作不对称问题 - 修复Agent.ts中subject参数传递错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export class BehaviorTree {
|
||||
ticker.openNodes.length = 0;
|
||||
this._root._execute(ticker);
|
||||
// 上次打开的节点
|
||||
let lastOpenNodes = blackboard.get("openNodes", this._id) as BaseNode[];
|
||||
let lastOpenNodes = (blackboard.get("openNodes", this._id) || []) as BaseNode[];
|
||||
// 当前打开的节点
|
||||
let currOpenNodes = ticker.openNodes;
|
||||
let start = 0;
|
||||
|
||||
Reference in New Issue
Block a user