summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index d6d9dabdc2..fff09ee289 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4414,6 +4414,12 @@ static void _dgn_place_item_explicit(const item_spec &spec,
if (is_stackable_item(mitm[item_made]) && spec.qty > 0)
mitm[item_made].quantity = spec.qty;
}
+
+ // Modify dungeon to ensure that the item is not on an invalid feature.
+ if (grd[x][y] == DNGN_DEEP_WATER)
+ grd[x][y] = DNGN_SHALLOW_WATER;
+ else if (grd[x][y] <= DNGN_MINMOVE || grd[x][y] == DNGN_LAVA)
+ grd[x][y] = DNGN_FLOOR;
}
static void _dgn_place_multiple_items(item_list &list,