diff --git a/game/pathfinding.c b/game/pathfinding.c index 294880b..45f880a 100644 --- a/game/pathfinding.c +++ b/game/pathfinding.c @@ -192,7 +192,7 @@ bool pathfindAStar(const PathfindingDesc *desc) { x < 0 || x >= map->width) continue; // not walkable - if (bzTileMapHasAnyCollision(map, x, y) && x != target.x && y != target.y) + if (bzTileMapHasAnyCollision(map, x, y) && (x != target.x || y != target.y)) continue; PathNodeRecord *curRecord = &closedSet[y * map->width + x]; if (curRecord->visited) @@ -265,7 +265,7 @@ bool pathfindAStar(const PathfindingDesc *desc) { } reversePath(pathData); - if (pathLen > 2) + if (false && pathLen > 2) smoothPath(map, pathData, desc->pool); *desc->outPath = (Path) {pathData, 0}; }