Fix crash when looping BT with Force Success node

This commit is contained in:
2026-09-24 23:38:50 +02:00
parent 0d4ea64caa
commit 0c63c91a7d
2 changed files with 18 additions and 7 deletions
+2
View File
@@ -112,6 +112,8 @@ BehaviorUpdateResult BehaviorTreeNode::InvokeUpdate(const BehaviorUpdateContext&
result = Update(context);
if ((int32)result < 0 || (int32)result > (int32)BehaviorUpdateResult::Failed)
result = BehaviorUpdateResult::Failed; // Invalid value is a failure
if (context.Behavior->GetResult() != BehaviorUpdateResult::Running)
return result; // Behavior is already finished, no need to continue
// Post-process result from decorators
for (BehaviorTreeDecorator* decorator : _decorators)