summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-abil.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 18:35:44 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-06 19:16:19 +0100
commit00c306495468af11d3aa59e1b4af7029dafaba7a (patch)
tree467008bc8f097aad7c6a7671e47e86affa6f4832 /crawl-ref/source/mon-abil.cc
parent1d256ce08004115e95813ca5496baaf9ad9d225c (diff)
downloadcrawl-ref-00c306495468af11d3aa59e1b4af7029dafaba7a.tar.gz
crawl-ref-00c306495468af11d3aa59e1b4af7029dafaba7a.zip
Don't trash player position in _siren_movement_effect.
swap_check's second argument is the monster's possible swap destination, not the position you want to swap from. _siren_movement_effect is likely still broken, since it doesn't take this desired swap target into account.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r--crawl-ref/source/mon-abil.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 8bdf731281..37207963de 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -482,11 +482,12 @@ static bool _siren_movement_effect(const monsters *monster)
monsters *mon = monster_at(newpos);
if (mon)
{
+ coord_def swapdest;
if (mons_wont_attack(mon)
&& !mons_is_stationary(mon)
&& !mons_cannot_act(mon)
&& !mon->asleep()
- && swap_check(mon, you.pos(), true))
+ && swap_check(mon, swapdest, true))
{
swapping = true;
}