summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:49:18 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-30 15:49:18 +0000
commitfd34c17a54e69fa53b0b6ae7123fdbd60e6303f7 (patch)
tree01846cf5096208daf13e1005b38647afe6676409 /crawl-ref/source/maps.cc
parent34cc3ee5d9832be20c635849dc592611c4697f2c (diff)
downloadcrawl-ref-fd34c17a54e69fa53b0b6ae7123fdbd60e6303f7.tar.gz
crawl-ref-fd34c17a54e69fa53b0b6ae7123fdbd60e6303f7.zip
[1742338] Fixed Hell portals not being revealed correctly when the horn is
sounded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1701 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 11eb43412f..7b387941ce 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -75,9 +75,11 @@ int vault_main(
vgrid[vx][MAP_SIDE] = 0;
}
- // NB - a return value of zero is not handled well by dungeon.cc (but there it is) 10mar2000 {dlb}
+ // Return value of zero forces dungeon.cc to regenerate the level, except
+ // for branch entry vaults where dungeon.cc just rejects the vault and
+ // places a vanilla entry.
return write_vault( vdefs[which_vault], vgrid, place, avoid );
-} // end vault_main()
+}
static int write_vault(map_def &mdef, map_type map,
vault_placement &place,
@@ -118,7 +120,12 @@ static bool resolve_map(map_def &map, const map_def &original)
mprf(MSGCH_WARN, "Lua error: %s", err.c_str());
return (false);
}
- map.resolve();
+ err = map.resolve();
+ if (!err.empty())
+ {
+ mprf(MSGCH_WARN, "Error: %s", err.c_str());
+ return (false);
+ }
if (!map.test_lua_validate(false))
return (false);