diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 14:20:44 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 14:20:44 +0000 |
commit | 8fda0acad5c6c6bf377684d2c14de56ea2e77adf (patch) | |
tree | ca6f9ca80d911f17e3ac9543230bb25d1f9fe225 /crawl-ref/source/maps.cc | |
parent | cb8c16f0c7b880d19b9e6f38b8ac697d8c2f885d (diff) | |
download | crawl-ref-8fda0acad5c6c6bf377684d2c14de56ea2e77adf.tar.gz crawl-ref-8fda0acad5c6c6bf377684d2c14de56ea2e77adf.zip |
Fixed level-compiler not warning of maps with the same name consistently.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1799 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r-- | crawl-ref/source/maps.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 1d609e3929..73dc38c0ad 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -384,6 +384,7 @@ map_def lc_map; level_range lc_range; depth_ranges lc_default_depths; bool lc_run_global_prelude = true; +map_load_info_t lc_loaded_maps; std::set<std::string> map_files_read; @@ -468,8 +469,11 @@ static bool load_map_index(const std::string &base) vdefs.resize( nexist + nmaps, map_def() ); for (int i = 0; i < nmaps; ++i) { - vdefs[nexist + i].read_index(inf); - vdefs[nexist + i].set_file(base); + map_def &vdef(vdefs[nexist + i]); + vdef.read_index(inf); + vdef.set_file(base); + lc_loaded_maps[vdef.name] = vdef.place_loaded_from; + vdef.place_loaded_from.clear(); } fclose(inf); @@ -597,6 +601,7 @@ void read_maps() // Clean up cached environments. dlua.callfn("dgn_flush_map_environments", 0, 0); + lc_loaded_maps.clear(); } void add_parsed_map( const map_def &md ) |