summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/teleport.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2011-12-28 17:14:33 -0500
committerNeil Moore <neil@s-z.org>2011-12-28 17:19:54 -0500
commit4fedd6d63ed1dcb8e8aea2bd51ad5fc343fa2527 (patch)
tree8c0293358febad519e8d45baae760b72d4944e29 /crawl-ref/source/teleport.cc
parent9cea761547996da7a63a26daaa3fcf4d43f5ec4c (diff)
downloadcrawl-ref-4fedd6d63ed1dcb8e8aea2bd51ad5fc343fa2527.tar.gz
crawl-ref-4fedd6d63ed1dcb8e8aea2bd51ad5fc343fa2527.zip
Avoid doubled "along for the ride" messages.
Also, avoid giving both "you release your grip" and "you lose your grip". As a side affect, attempting but failing to move (because of an impassable target, beholding, or fearmongering) no longer releases constrictions.
Diffstat (limited to 'crawl-ref/source/teleport.cc')
-rw-r--r--crawl-ref/source/teleport.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/teleport.cc b/crawl-ref/source/teleport.cc
index 12da6f094f..5a0ca7bd9e 100644
--- a/crawl-ref/source/teleport.cc
+++ b/crawl-ref/source/teleport.cc
@@ -78,10 +78,14 @@ bool monster::blink_to(const coord_def& dest, bool quiet)
monster_teleport_to_player(constricted_by, dest);
}
for (int i = 0; i < MAX_CONSTRICT; i++)
- if (constricting[i] == MHITYOU)
+ {
+ if (constricting[i] == constricted_by)
+ ; // Already moved, do nothing.
+ else if (constricting[i] == MHITYOU)
player_teleport_to_monster(this, dest);
else if (constricting[i] != NON_ENTITY)
monster_teleport_to_player(constricting[i], dest);
+ }
// Now break our nonadjacent constrictions.
clear_far_constrictions();