Change collisionMap to boolean value

This commit is contained in:
2023-11-18 12:53:34 +01:00
parent 05f1789e5c
commit 2d50a43a73
5 changed files with 42 additions and 78 deletions

View File

@@ -54,7 +54,7 @@ bool findPath(const PathfindingDesc *desc) {
if (y < 0 || y >= map->height ||
x < 0 || x >= map->width)
continue;
if (bzTileMapGetCollider(map, x, y).type != BZ_TILE_SHAPE_NONE)
if (bzTileMapHasCollision(map, x, y))
continue;
Visited *curVisited = &visited[y * map->width + x];
if (curVisited->visited)