summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-12-17 11:06:39 -0500
committerNeil Moore <neil@s-z.org>2013-12-17 11:10:24 -0500
commit89529d69eac60634832b7f84437fc24263dd3d7a (patch)
tree2ea7c3c1b524d2eb6e5751ed3c9364b4c55d5af9 /crawl-ref/source/misc.cc
parente61f08ba6ef1e42c52dd3f598fb833b8d17f2d09 (diff)
downloadcrawl-ref-89529d69eac60634832b7f84437fc24263dd3d7a.tar.gz
crawl-ref-89529d69eac60634832b7f84437fc24263dd3d7a.zip
Unseal stairs too when warden seal expires (#7874, #7875)
Games saved with a perma-seal should fix themselves on player's next turn when run_environment_effects is called.
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 8e96c7992d..2afa5b8249 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1898,6 +1898,13 @@ void timeout_tombs(int duration)
}
}
+static bool _feat_is_sealed(dungeon_feature_type feat)
+{
+ return feat == DNGN_SEALED_DOOR
+ || feat == DNGN_SEALED_STAIRS_DOWN
+ || feat == DNGN_SEALED_STAIRS_UP;
+}
+
void timeout_terrain_changes(int duration, bool force)
{
if (!duration && !force)
@@ -1916,7 +1923,7 @@ void timeout_terrain_changes(int duration, bool force)
marker->duration -= duration;
if (marker->change_type == TERRAIN_CHANGE_DOOR_SEAL
- && grd(marker->pos) != DNGN_SEALED_DOOR)
+ && !_feat_is_sealed(grd(marker->pos)))
{
continue;
}