summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-12-03 17:05:55 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-12-03 17:05:55 +0100
commit751bbe5bdbf43c877b0ec4c537ac128ee8ea4627 (patch)
treea1b41ef5a5c2d544c8c8a5b361cb170b84c2bb13 /crawl-ref/source/terrain.cc
parentceb8826442a892b8bb8e3046ae9cd9b477906754 (diff)
downloadcrawl-ref-751bbe5bdbf43c877b0ec4c537ac128ee8ea4627.tar.gz
crawl-ref-751bbe5bdbf43c877b0ec4c537ac128ee8ea4627.zip
Don't copy DNGN_UNDISCOVERED_TRAP to map knowledge.
Fixes trave colouring revealing undiscovered traps.
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 20a5fad0d0..2760662e79 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -489,10 +489,15 @@ void get_door_description(int door_size, const char** adjective, const char** no
dungeon_feature_type grid_appearance(const coord_def &gc)
{
dungeon_feature_type feat = env.grid(gc);
- if (feat == DNGN_SECRET_DOOR)
- feat = grid_secret_door_appearance(gc);
-
- return feat;
+ switch (feat)
+ {
+ case DNGN_SECRET_DOOR:
+ return grid_secret_door_appearance(gc);
+ case DNGN_UNDISCOVERED_TRAP:
+ return DNGN_FLOOR;
+ default:
+ return feat;
+ }
}
dungeon_feature_type grid_secret_door_appearance(const coord_def &where)