summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-11 16:52:37 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-11 16:52:37 +0000
commit8139b72640321839d4f19245ed323030840294be (patch)
treef0d2dd8311f045d19897c5ab99a9fd0860c2b1f6
parent8365f128eaba1e48bd2af79621a303087261f1d6 (diff)
downloadcrawl-ref-8139b72640321839d4f19245ed323030840294be.tar.gz
crawl-ref-8139b72640321839d4f19245ed323030840294be.zip
Labyrinth entrance fix and .dsc lock for 0.3.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2433 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/dungeon.cc2
-rw-r--r--crawl-ref/source/mapdef.cc6
2 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 39c74467c9..90e495fdd9 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -5815,7 +5815,7 @@ static bool has_vault_in_radius(const coord_def &pos, int radius,
static coord_def labyrinth_find_entry_point(const dgn_region &reg,
const coord_def &end)
{
- const int min_distance = 35 * 35;
+ const int min_distance = 20 * 20;
// Try many times.
for (int i = 0; i < 2000; ++i)
{
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index b13457cc49..0cdca251b0 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -1239,8 +1239,10 @@ void map_def::load()
{
if (!index_only)
return;
-
- const std::string loadfile = get_descache_path(file, ".dsc");
+
+ const std::string descache_base = get_descache_path(file, "");
+ file_lock deslock(descache_base + ".lk", "rb", false);
+ const std::string loadfile = descache_base + ".dsc";
FILE *inf = fopen(loadfile.c_str(), "rb");
fseek(inf, cache_offset, SEEK_SET);
read_full(inf);