summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 02:29:36 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 02:29:36 +0000
commit91d30564b7c390b12eecfba759ad893b67217797 (patch)
treee42e7ad7bcc15f9b67278aeda89db2febe2a97d7
parenta0f476f10e57c6cb87fa62e83e7ab98c5e1c4aab (diff)
downloadcrawl-ref-91d30564b7c390b12eecfba759ad893b67217797.tar.gz
crawl-ref-91d30564b7c390b12eecfba759ad893b67217797.zip
Fixed [1921145] [Tiles] closed gate tiles not updated.
Fixed issue where doors in an L-shape would get the incorrect tile. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3865 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc12
-rw-r--r--crawl-ref/source/tile1.cc4
2 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index b7b440ea8f..f2f3225a51 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3649,9 +3649,13 @@ static void open_door(int move_x, int move_y, bool check_confused)
// Even if some of the door is out of LOS, we want the entire
// door to be updated. Hitting this case requires a really big
// door!
- // Should set_terrain_changed() be used, too?
if (is_terrain_seen(dc))
+ {
set_envmap_obj(dc.x, dc.y, DNGN_OPEN_DOOR);
+#ifdef USE_TILE
+ tile_place_tile_bk(dc.x, dc.y, TILE_DNGN_OPEN_DOOR);
+#endif
+ }
}
you.turn_is_over = true;
}
@@ -3775,9 +3779,13 @@ static void close_door(int door_x, int door_y)
// Even if some of the door is out of LOS once it's closed (or even
// if some of it is out of LOS when it's open), we want the entire
// door to be updated.
- // Should set_terrain_changed() be used, too?
if (is_terrain_seen(dc))
+ {
set_envmap_obj(dc.x, dc.y, DNGN_CLOSED_DOOR);
+#ifdef USE_TILE
+ tile_place_tile_bk(dc.x, dc.y, TILE_DNGN_CLOSED_DOOR);
+#endif
+ }
}
you.turn_is_over = true;
}
diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc
index 6c2feea8b4..06e3342603 100644
--- a/crawl-ref/source/tile1.cc
+++ b/crawl-ref/source/tile1.cc
@@ -3431,10 +3431,8 @@ void tile_init_flavor()
bool door_left = (x > 0 && grd[x-1][y] == grd[x][y]);
bool door_right = (x < GXM - 1 && grd[x+1][y] == grd[x][y]);
- bool door_up = (y > 0 && grd[x][y-1] == grd[x][y]);
- bool door_down = (y < GYM - 1 && grd[x][y+1] == grd[x][y]);
- if ((door_left || door_right) && !door_up && !door_down)
+ if (door_left || door_right)
{
int target;
if (door_left && door_right)