Removed the variable limit setting since it's never used and instead just have WALL_PATH_LIMIT.

This commit is contained in:
Zed A. Shaw 2024-12-05 08:41:10 -05:00
parent 9abb39a3bf
commit eb0ca38e30
19 changed files with 50 additions and 58 deletions

View file

@ -171,12 +171,9 @@ void WorldBuilder::place_rooms() {
bool WorldBuilder::dig_tunnel(PointList &holes, Point &src, Point &target) {
Matrix &paths = $map.paths();
// BUG: limit should be a constant since it never changes
int limit = $map.limit();
dbc::check(paths[src.y][src.x] != limit,
dbc::check(paths[src.y][src.x] != WALL_PATH_LIMIT,
"source room has path as a wall");
dbc::check(paths[target.y][target.x] != limit,
dbc::check(paths[target.y][target.x] != WALL_PATH_LIMIT,
"target room has path as a wall");
bool found = false;