]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix HTN/NPC better plan selection (#30017)
authorosjarw <62134478+osjarw@users.noreply.github.com>
Sun, 14 Jul 2024 10:28:46 +0000 (13:28 +0300)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 10:28:46 +0000 (20:28 +1000)
* recording commit

* Remove debugging/recording content

Content.Server/NPC/HTN/HTNPlanJob.cs

index d6d10ad311f784d810ec1953c02f6ec3d84e4d05..8158303524a6a7661309d9b7e3cb778f419623dc 100644 (file)
@@ -160,9 +160,9 @@ public sealed class HTNPlanJob : Job<HTNPlan>
     {
         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)