Hotfix path empty frontier issue (#12334)

This commit is contained in:
metalgearsloth
2022-11-01 22:50:35 +11:00
committed by GitHub
parent dbb23f9cf7
commit 41c8e382a4
2 changed files with 12 additions and 0 deletions

View File

@@ -25,6 +25,12 @@ public sealed partial class PathfindingSystem
// Re-validate nodes
else
{
// Theoretically this shouldn't be happening, but practically...
if (request.Frontier.Count == 0)
{
return PathResult.NoPath;
}
(_, currentNode) = request.Frontier.Peek();
if (!currentNode.IsValid())