From 9f40c7a2cc3a7927134757be3c112142c2239cfa Mon Sep 17 00:00:00 2001 From: magicsea <313451394@qq.com> Date: Fri, 15 Nov 2024 11:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/BehaviorTree.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/BehaviorTree.go b/core/BehaviorTree.go index 3b193f6..e16da55 100644 --- a/core/BehaviorTree.go +++ b/core/BehaviorTree.go @@ -295,16 +295,12 @@ func (this *BehaviorTree) Tick(target interface{}, blackboard *Blackboard) b3.St var currOpenNodes []IBaseNode currOpenNodes = append(currOpenNodes, tick._openNodes...) - var same bool l := len(lastOpenNodes) if l == len(currOpenNodes) { if l == 0 || lastOpenNodes[l-1] == currOpenNodes[l-1] { - same = true + return state } } - if same { - return state - } // does not close if it is still open in this tick var start = 0