Remove asserts in favor of failing pathfinding
This commit is contained in:
@@ -360,7 +360,6 @@ void loadMap(Game *game, const char *path, bool mainMenu) {
|
||||
}
|
||||
}
|
||||
ecs_filter_fini(harvestableFilter);
|
||||
bzLogInfo("%d %d", workerIdx, harvestableIdx);
|
||||
|
||||
for (i32 i = 0; i < workerIdx; i++) {
|
||||
PosPair nearest = harvestables[0];
|
||||
|
||||
@@ -128,8 +128,9 @@ bool pathfindAStar(const PathfindingDesc *desc) {
|
||||
|
||||
Vec2i start = bzTileMapPosToTile(map, desc->start);
|
||||
Vec2i target = bzTileMapPosToTile(map, desc->target);
|
||||
BZ_ASSERT(start.x >= 0 && start.x < map->width);
|
||||
BZ_ASSERT(start.y >= 0 && start.y < map->height);
|
||||
if (start.x < 0 || start.x >= map->width ||
|
||||
start.y < 0 || start.y >= map->height)
|
||||
return false;
|
||||
|
||||
// Perform very cheap ray cast check
|
||||
if (bzTileMapCanRayCastLine(map, desc->start, desc->target)) {
|
||||
|
||||
Reference in New Issue
Block a user