summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.h
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2011-01-10 16:48:06 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2011-01-10 16:48:06 +0530
commita0fdfd53fa3c97b60d56328f5af202ac9beb828d (patch)
treec24def2a799ff0469fc5f546f4804368c4d4b622 /crawl-ref/source/maps.h
parent5cc8e1883ac68c2cd10c633036abaf2500937d45 (diff)
downloadcrawl-ref-a0fdfd53fa3c97b60d56328f5af202ac9beb828d.tar.gz
crawl-ref-a0fdfd53fa3c97b60d56328f5af202ac9beb828d.zip
Fix Ziggurat save/load failure.
We used to call run_map_preludes after loading the game, in case maps wanted to change their depths, etc. based on character type. With the new Lua function marshalling, however, we rely on .des file global preludes being loaded before loading the save file (since any Lua functions referenced in a save file must be locatable by name when loading the save). The fix is to split run_map_preludes in two: run_map_global_preludes which runs .des file global preludes and is called before loading saves, and run_map_local_preludes which is called after game start.
Diffstat (limited to 'crawl-ref/source/maps.h')
-rw-r--r--crawl-ref/source/maps.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/maps.h b/crawl-ref/source/maps.h
index ea9ee33293..638ab6dc54 100644
--- a/crawl-ref/source/maps.h
+++ b/crawl-ref/source/maps.h
@@ -63,7 +63,8 @@ void read_maps();
void reread_maps();
void sanity_check_maps();
void read_map(const std::string &file);
-void run_map_preludes();
+void run_map_global_preludes();
+void run_map_local_preludes();
void reset_map_parser();
std::string get_descache_path(const std::string &file,
const std::string &ext);