diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/maps.cc | 3 |
2 files changed, 7 insertions, 2 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, diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 5681996681..518037e585 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -190,8 +190,7 @@ static bool bad_map_place(const map_def &map, if (!grid_is_opaque(grid) && grid != DNGN_FLOOR - && !grid_is_water(grid) - && grid != DNGN_LAVA + && grid != DNGN_SHALLOW_WATER && grid != DNGN_CLOSED_DOOR && grid != DNGN_OPEN_DOOR && grid != DNGN_SECRET_DOOR) |