From 144d923598efdf70d12d19437b2a59dee0015c01 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 11 Jul 2009 23:18:30 +0000 Subject: Detected secret doors are now treated as a distinct new door type, so that stupid monsters will continue to ignore them as long as they've never been opened. Shifts wall and door types of existing save files. Also apply patch by one the "nobodies" to make bloody tiles show up again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10167 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dungeon.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/dungeon.cc') diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 1c4a49e9a4..5403924f7d 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -1719,7 +1719,7 @@ static void _check_doors() for (int x = 1; x < GXM-1; x++) for (int y = 1; y < GYM-1; y++) { - if (grd[x][y] != DNGN_CLOSED_DOOR) + if (!grid_is_closed_door(grd[x][y])) continue; int solid_count = 0; @@ -1736,7 +1736,8 @@ static void _check_doors() if (grid_is_solid( grd[x][y + 1] )) solid_count++; - grd[x][y] = ((solid_count < 2) ? DNGN_FLOOR : DNGN_CLOSED_DOOR); + grd[x][y] = (solid_count < 2 ? DNGN_FLOOR + : DNGN_CLOSED_DOOR); } } @@ -3136,8 +3137,8 @@ static void _make_trail(int xs, int xr, int ys, int yr, int corrlength, static int _good_door_spot(int x, int y) { - if ((!grid_is_solid(grd[x][y]) && grd[x][y] < DNGN_ENTER_PANDEMONIUM) - || grd[x][y] == DNGN_CLOSED_DOOR) + if (!grid_is_solid(grd[x][y]) && grd[x][y] < DNGN_ENTER_PANDEMONIUM + || grid_is_closed_door(grd[x][y])) { return 1; } @@ -3931,7 +3932,7 @@ static void _dig_vault_loose( vault_placement &place, static bool _grid_needs_exit(int x, int y) { return (!grid_is_solid(x, y) - || grd[x][y] == DNGN_CLOSED_DOOR + || grid_is_closed_door(grd[x][y]) || grd[x][y] == DNGN_SECRET_DOOR); } -- cgit v1.2.3-54-g00ecf