修复bug

This commit is contained in:
wuwenbo 2025-07-08 19:36:40 +08:00
parent f521badf66
commit 7b68aff53a

View File

@ -1327,7 +1327,7 @@ namespace Logic.AI
if (distance < minDistance)
{
var path = PathFinder.FindPath((int)Map.MapConfig.Width, (int)Map.MapConfig.Height,
new (selfGrid.Pos.X, selfGrid.Pos.Y), new (cityGrid.Pos.X, cityGrid.Pos.Y), Map, Player);
new (cityGrid.Pos.X, cityGrid.Pos.Y), new (selfGrid.Pos.X, selfGrid.Pos.Y), Map, Player);
if (!path.found) continue;
if (path.length > minDistance) continue;
minDistance = path.length;