diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-01-25 00:43:09 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-01-26 00:40:19 +0100 |
commit | 1271bffce84eb988b63c9c52efb0a5d9a6cb1d9e (patch) | |
tree | 21beabcd7b5a7de7ccc3a56201a67498a56d141a /crawl-ref/source/maps.cc | |
parent | 35673f843b19d211fb492608a273e56671cdc18b (diff) | |
download | crawl-ref-1271bffce84eb988b63c9c52efb0a5d9a6cb1d9e.tar.gz crawl-ref-1271bffce84eb988b63c9c52efb0a5d9a6cb1d9e.zip |
Force a rebuild of the des cache.
For some reason the 0.11 compat commit causes the builder to find any vaults
if the cache has been created by any older build. This is puzzling as on-disk
files are byte-to-byte identical except for the minor save tag, and none of
values inside vaults care about any minor tags.
It probably would be safer to find the cause, yet this rebuild seems to work.
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r-- | crawl-ref/source/maps.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 0b06ba0d22..eb7f4075bb 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -1176,6 +1176,9 @@ static bool verify_file_version(const string &file, time_t mtime) fclose(fp); return (major == TAG_MAJOR_VERSION && minor <= TAG_MINOR_VERSION +#if TAG_MAJOR_VERSION == 34 + && minor >= TAG_MINOR_0_12 +#endif && t == mtime); } catch (short_read_exception &E) @@ -1209,6 +1212,10 @@ static bool _load_map_index(const string& cache, const string &base, int64_t t = unmarshallSigned(inf); if (major != TAG_MAJOR_VERSION || minor > TAG_MINOR_VERSION || t != mtime) return false; +#if TAG_MAJOR_VERSION == 34 + if (minor < TAG_MINOR_0_12) + return false; +#endif lc_global_prelude.read(inf); fclose(fp); @@ -1227,6 +1234,10 @@ static bool _load_map_index(const string& cache, const string &base, int64_t t = unmarshallSigned(inf); if (major != TAG_MAJOR_VERSION || minor > TAG_MINOR_VERSION || t != mtime) return false; +#if TAG_MAJOR_VERSION == 34 + if (minor < TAG_MINOR_0_12) + return false; +#endif const int nmaps = unmarshallShort(inf); const int nexist = vdefs.size(); vdefs.resize(nexist + nmaps, map_def()); |