Skip to content

Commit

Permalink
Fix HTN/NPC better plan selection (space-wizards#30017)
Browse files Browse the repository at this point in the history
* recording commit

* Remove debugging/recording content
  • Loading branch information
osjarw authored and Baa14453 committed Oct 19, 2024
1 parent 565dd13 commit 3a5b3c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/NPC/HTN/HTNPlanJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ private bool TryFindSatisfiedMethod(HTNCompoundTask compoundId, Queue<HTNTask> t
{
var compound = _protoManager.Index<HTNCompoundPrototype>(compoundId.Task);

for (var i = mtrIndex; i < compound.Branches.Count; i++)
for (; mtrIndex < compound.Branches.Count; mtrIndex++)
{
var branch = compound.Branches[i];
var branch = compound.Branches[mtrIndex];
var isValid = true;

foreach (var con in branch.Preconditions)
Expand Down

0 comments on commit 3a5b3c4

Please sign in to comment.