summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/terrain.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r--crawl-ref/source/terrain.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 4c470000eb..aa4eba2335 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -610,7 +610,9 @@ void dungeon_terrain_changed(const coord_def &pos,
if (is_notable_terrain(nfeat) && see_grid(pos))
seen_notable_thing(nfeat, pos);
- destroy_trap(pos);
+ // Don't destroy a trap which was just placed.
+ if (nfeat < DNGN_TRAP_MECHANICAL || nfeat > DNGN_UNDISCOVERED_TRAP)
+ destroy_trap(pos);
}
_dgn_check_terrain_items(pos, preserve_items);