diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2011-01-10 16:48:06 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2011-01-10 16:48:06 +0530 |
commit | a0fdfd53fa3c97b60d56328f5af202ac9beb828d (patch) | |
tree | c24def2a799ff0469fc5f546f4804368c4d4b622 /crawl-ref/source/ctest.cc | |
parent | 5cc8e1883ac68c2cd10c633036abaf2500937d45 (diff) | |
download | crawl-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/ctest.cc')
-rw-r--r-- | crawl-ref/source/ctest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/ctest.cc b/crawl-ref/source/ctest.cc index a576fe3589..cf0725fc9a 100644 --- a/crawl-ref/source/ctest.cc +++ b/crawl-ref/source/ctest.cc @@ -144,7 +144,8 @@ namespace crawl_tests flush_prev_message(); - run_map_preludes(); + run_map_global_preludes(); + run_map_local_preludes(); reset_test_data(); init_test_bindings(); |