diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-05-08 04:47:33 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-05-08 05:03:57 +0530 |
commit | 21156d0e4fb07c9379cd03ba75a1ad4a9a27cc8c (patch) | |
tree | 760fb5a5ecef0f2d530196226d25b8bb655a0ecf /crawl-ref/source/files.h | |
parent | 50548869aaaa71d7c1698ec5d3f5937d0e6ebdc1 (diff) | |
download | crawl-ref-21156d0e4fb07c9379cd03ba75a1ad4a9a27cc8c.tar.gz crawl-ref-21156d0e4fb07c9379cd03ba75a1ad4a9a27cc8c.zip |
[1515] Fix X + [] not reactivating Lua markers after excursion.
level_excursion was reactivating Lua markers only if the player was not on the
original level when the destructor was called. Since the level-map explicitly
does a go_to(original), this is never the case.
The fix is to reactivate Lua markers if the level_excursion *ever* moved
off-level.
This also allows us to dispense with the LOAD_RETURN mode of reloading levels.
LOAD_RETURN only served two purposes: to activate markers and then to fire the
dungeon event for the player entering the level. However, this event should not
be fired for level excursions, because the player never physically left the
level, and reactivating markers can be done safely after _load_level returns.
Diffstat (limited to 'crawl-ref/source/files.h')
-rw-r--r-- | crawl-ref/source/files.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/files.h b/crawl-ref/source/files.h index e4e9e34e62..a3eef25f16 100644 --- a/crawl-ref/source/files.h +++ b/crawl-ref/source/files.h @@ -20,8 +20,7 @@ enum load_mode_type LOAD_START_GAME, // game has just begun LOAD_RESTART_GAME, // loaded savefile LOAD_ENTER_LEVEL, // entered a level for the first time - LOAD_VISITOR, // Visitor pattern to see all levels - LOAD_RETURN // Returning to original level after visit. + LOAD_VISITOR // Visitor pattern to see all levels }; // referenced in files - newgame - ouch - dgn-overview: @@ -113,12 +112,13 @@ bool is_existing_level(const level_id &level); class level_excursion { level_id original; + bool ever_changed_levels; public: level_excursion(); ~level_excursion(); - void go_to(const level_id &level, bool orig=false); + void go_to(const level_id &level); }; void save_ghost( bool force = false ); |