summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-transloc.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2012-12-24 12:33:59 +0000
committerChris Campbell <chriscampbell89@gmail.com>2012-12-24 12:33:59 +0000
commit7f0416492553db52d7613d506b8ab584b7819904 (patch)
treed4b2c29143c7b98b1f97fae9a80767320528e270 /crawl-ref/source/spl-transloc.cc
parenta9aa566fed43892e00eeda9f5fd02a3d7dc19da2 (diff)
downloadcrawl-ref-7f0416492553db52d7613d506b8ab584b7819904.tar.gz
crawl-ref-7f0416492553db52d7613d506b8ab584b7819904.zip
Fix teleporters ignoring stasis, add failure messages for some vaults
Except for Zigsprint teleporters, Maxwell's users should be encouraged at all costs.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r--crawl-ref/source/spl-transloc.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc
index d7bc8bd797..a4e8eedf03 100644
--- a/crawl-ref/source/spl-transloc.cc
+++ b/crawl-ref/source/spl-transloc.cc
@@ -690,7 +690,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area,
return (!is_controlled);
}
-bool you_teleport_to(const coord_def where_to, bool move_monsters)
+bool you_teleport_to(const coord_def where_to, bool move_monsters, bool override_stasis)
{
// Attempts to teleport the player from their current location to 'where'.
// Follows this line of reasoning:
@@ -703,6 +703,12 @@ bool you_teleport_to(const coord_def where_to, bool move_monsters)
// then teleport the player there.
// 4. If not, give up and return false.
+ if (item_blocks_teleport(true, true) && !override_stasis)
+ {
+ canned_msg(MSG_STRANGE_STASIS);
+ return false;
+ }
+
bool check_ring_TC = false;
const coord_def old_pos = you.pos();
coord_def where = where_to;