diff options
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index d7d8fb9c1b..e70d5fa9e3 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1676,6 +1676,11 @@ void up_stairs(dungeon_feature_type force_stair, return; } + // Bail if any markers veto the move. + if (!dungeon_events.fire_vetoable_position_event(DETV_LEAVE_LEVEL, + you.pos())) + return; + // Checks are done, the character is committed to moving between levels. leaving_level_now(); @@ -2056,6 +2061,11 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, } } + // Bail if any markers veto the move. + if (!dungeon_events.fire_vetoable_position_event(DETV_LEAVE_LEVEL, + you.pos())) + return; + const level_id destination_override(_stair_destination_override()); // All checks are done, the player is on the move now. |