summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-07 17:01:37 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-07 17:01:37 +0000
commitf679a5b0cc0a5ea257b4cf2a618adca9d0b8c0db (patch)
tree1fe388f44674795ba3340e41d3f322e0908bd545 /crawl-ref/source/dungeon.cc
parent08872e2829cf5647c431c4643c62aed175fe1a24 (diff)
downloadcrawl-ref-f679a5b0cc0a5ea257b4cf2a618adca9d0b8c0db.tar.gz
crawl-ref-f679a5b0cc0a5ea257b4cf2a618adca9d0b8c0db.zip
[1982933] [1790502] Fixing issue with vaults being generated on lava.
Lava and deep water now prevent (non-clobber) vaults from being placed. Additionally, items will modify the dungeon square they're placed on so that they are placed on floor or shallow water. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5544 c06c8d41-db1a-0410-9941-cceddc491573
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,