From 751bbe5bdbf43c877b0ec4c537ac128ee8ea4627 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 3 Dec 2009 17:05:55 +0100 Subject: Don't copy DNGN_UNDISCOVERED_TRAP to map knowledge. Fixes trave colouring revealing undiscovered traps. --- crawl-ref/source/terrain.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/terrain.cc') 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) -- cgit v1.2.3-54-g00ecf