summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-25 12:56:07 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-25 13:03:01 +0200
commit8d3dd664121849bab648aa96b4e5e88512f77fa9 (patch)
tree859e08eac2d39c534c2411247a3b2df5ea9ed3cc /crawl-ref/source/mon-behv.h
parentc17ed30b488b7008e9f91ddb092236ba43437eb8 (diff)
downloadcrawl-ref-8d3dd664121849bab648aa96b4e5e88512f77fa9.tar.gz
crawl-ref-8d3dd664121849bab648aa96b4e5e88512f77fa9.zip
Cache position of the Orb.
It is referenced many times for every monster per turn in ZotDef.
Diffstat (limited to 'crawl-ref/source/mon-behv.h')
-rw-r--r--crawl-ref/source/mon-behv.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/crawl-ref/source/mon-behv.h b/crawl-ref/source/mon-behv.h
index f6f3928406..4c650c0dfa 100644
--- a/crawl-ref/source/mon-behv.h
+++ b/crawl-ref/source/mon-behv.h
@@ -39,11 +39,7 @@ void make_mons_leave_level(monster* mon);
bool monster_can_hit_monster(monster* mons, const monster* targ);
// For Zotdef: the target position of MHITYOU monsters is
-// the orb, if it's on the ground. Note that zotdef_target()
-// returns the orb position, or you.pos if the orb's not
-// on the ground.
-#define PLAYER_POS (crawl_state.game_is_zotdef() ? zotdef_target() : you.pos())
-
-coord_def zotdef_target();
+// the orb.
+#define PLAYER_POS (crawl_state.game_is_zotdef() ? env.orb_pos : you.pos())
#endif