diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-07-30 22:03:36 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-07-30 22:05:13 -0600 |
commit | 955a4064aba1a6e84552da08875209825618f798 (patch) | |
tree | 33f24b23b92d5fd705ab8ec9428d95c661e8ca74 /crawl-ref/source/maps.cc | |
parent | c30fc8ff53bf49b84f04d87e97413450d1951842 (diff) | |
download | crawl-ref-955a4064aba1a6e84552da08875209825618f798.tar.gz crawl-ref-955a4064aba1a6e84552da08875209825618f798.zip |
replace_portal takes predence over overwrite_floor_cell.
If the vault designates a possible location for a 1x1 portal, that now
takes precedence over other terrain checks for placing that portal.
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r-- | crawl-ref/source/maps.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index ed266dade0..59b2d85f83 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -434,6 +434,10 @@ static bool _map_safe_vault_place(const map_def &map, if (lines[dp.y][dp.x] == ' ') continue; + // Unconditionally allow portal placements to work. + if (vault_can_replace_portals && _is_portal_place(cp)) + continue; + if (!vault_can_overwrite_other_vaults) { // Also check adjacent squares for collisions, because being next @@ -455,9 +459,7 @@ static bool _map_safe_vault_place(const map_def &map, // Don't overwrite features other than floor, rock wall, doors, // nor water, if !water_ok. - if (!_may_overwrite_feature(cp, water_ok) - && (!vault_can_replace_portals - || !_is_portal_place(cp))) + if (!_may_overwrite_feature(cp, water_ok)) { return false; } |