summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-02 04:49:06 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-02 04:49:06 +0000
commitea12034397dd2aa7118cae28194de688fa25d8d0 (patch)
treee64582e019e83995e47b18ef970a9eae27d80e44 /crawl-ref/source
parent23d661663d7014a294e67e3bc138212556595be7 (diff)
downloadcrawl-ref-ea12034397dd2aa7118cae28194de688fa25d8d0.tar.gz
crawl-ref-ea12034397dd2aa7118cae28194de688fa25d8d0.zip
beem was being setup too early in the _handle_monster_move() loop, causing
mons_cast() to sometimes be called with an outdated target. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8103 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/monstuff.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index b0ca5be470..4b18876eac 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -6499,12 +6499,6 @@ static void _handle_monster_move(int i, monsters *monster)
if (!monster->alive())
break;
- bolt beem;
-
- beem.source = monster->pos();
- beem.target = monster->target;
- beem.beam_source = monster->mindex();
-
#if DEBUG_MONS_SCAN
if (!monster_was_floating
&& mgrd(monster->pos()) != monster->mindex())
@@ -6766,6 +6760,12 @@ static void _handle_monster_move(int i, monsters *monster)
}
_handle_nearby_ability( monster );
+ bolt beem;
+
+ beem.source = monster->pos();
+ beem.target = monster->target;
+ beem.beam_source = monster->mindex();
+
if (!mons_is_sleeping(monster)
&& !mons_is_wandering(monster)