diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 00:22:47 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-23 00:22:47 -0800 |
commit | c6e1802d7480bb26cf83f48ff30d86c29bb45d17 (patch) | |
tree | 4383a707ddf2171d9fd86b99ff5b3c7ce2c06121 /crawl-ref/source | |
parent | b71fe38f3c177a6a912b9c80f5c32ae0a85edb75 (diff) | |
download | crawl-ref-c6e1802d7480bb26cf83f48ff30d86c29bb45d17.tar.gz crawl-ref-c6e1802d7480bb26cf83f48ff30d86c29bb45d17.zip |
Tiny teleports don't throw monster off track
If a teleport moves the player so little it's more like a blink, then
monsters which are tracking the player won't lose the scent.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/spells3.cc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index a5e490fc65..aa9a370c32 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1609,20 +1609,22 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) } if (large_change) - handle_interrupted_swap(true); - - viewwindow(false, true); - for (monster_iterator mi; mi; ++mi) { - const bool see_cell = you.see_cell(mi->pos()); - - if (mi->foe == MHITYOU && !see_cell) + viewwindow(false, true); + for (monster_iterator mi; mi; ++mi) { - mi->foe_memory = 0; - behaviour_event(*mi, ME_EVAL); + const bool see_cell = you.see_cell(mi->pos()); + + if (mi->foe == MHITYOU && !see_cell) + { + mi->foe_memory = 0; + behaviour_event(*mi, ME_EVAL); + } + else if (see_cell) + behaviour_event(*mi, ME_EVAL); } - else if (see_cell) - behaviour_event(*mi, ME_EVAL); + + handle_interrupted_swap(true); } // Might identify unknown ring of teleport control. |