From dfc75f60ba6522a7c00e0ad17c0b6d901a63eb49 Mon Sep 17 00:00:00 2001 From: caesuric Date: Sat, 25 May 2024 06:41:56 -0400 Subject: [PATCH] fixed bug with new version --- MountainGoap/Internals/ActionAStar.cs | 1 + MountainGoap/MountainGoap.csproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MountainGoap/Internals/ActionAStar.cs b/MountainGoap/Internals/ActionAStar.cs index 454d488..802b030 100644 --- a/MountainGoap/Internals/ActionAStar.cs +++ b/MountainGoap/Internals/ActionAStar.cs @@ -63,6 +63,7 @@ internal ActionAStar(ActionGraph graph, ActionNode start, BaseGoal goal, float c if (newCost > costMaximum || newStepCount > stepMaximum) continue; if (!CostSoFar.ContainsKey(next) || newCost < CostSoFar[next]) { CostSoFar[next] = newCost; + StepsSoFar[next] = newStepCount; float priority = newCost + Heuristic(next, goal, current); frontier.Enqueue(next, priority); CameFrom[next] = current; diff --git a/MountainGoap/MountainGoap.csproj b/MountainGoap/MountainGoap.csproj index 762f388..55e20f5 100644 --- a/MountainGoap/MountainGoap.csproj +++ b/MountainGoap/MountainGoap.csproj @@ -6,7 +6,7 @@ enable enable True - 1.1.0 + 1.1.1 True A simple GOAP (Goal Oriented Action Planning) library. MIT licensed 2022