summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-06 10:44:28 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-06 10:44:28 -0600
commit32792aa54bd2f43849a6864391d8e16afb5b3dd3 (patch)
treeee9ed701846f65ec0d5b6c6eb866244434dbc405 /crawl-ref/source/mon-behv.cc
parentf7274ebf7b56aecaebd2207582ce37879a47b697 (diff)
downloadcrawl-ref-32792aa54bd2f43849a6864391d8e16afb5b3dd3.tar.gz
crawl-ref-32792aa54bd2f43849a6864391d8e16afb5b3dd3.zip
Simplify.
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r--crawl-ref/source/mon-behv.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index b511a9ffb3..779f5f8247 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -1642,14 +1642,14 @@ void _set_nearest_monster_foe(monsters *mon)
}
}
-///---------------------------------------------------------------
+//-----------------------------------------------------------------
//
// behaviour_event
//
// 1. Change any of: monster state, foe, and attitude
-// 2. Call handle_behaviour to re-evaluate AI state and target x,y
+// 2. Call handle_behaviour to re-evaluate AI state and target x, y
//
-//---------------------------------------------------------------
+//-----------------------------------------------------------------
void behaviour_event(monsters *mon, mon_event_type event, int src,
coord_def src_pos, bool allow_shout)
{
@@ -1669,7 +1669,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
if (src == MHITYOU)
sourceWontAttack = true;
else if (src != MHITNOT)
- sourceWontAttack = mons_wont_attack( &menv[src] );
+ sourceWontAttack = mons_wont_attack(&menv[src]);
if (is_sanctuary(mon->pos()) && mons_is_fleeing_sanctuary(mon))
{
@@ -1879,7 +1879,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
mon->attitude = ATT_HOSTILE;
}
else if (src != MHITNOT)
- mon->target = menv[src].pos();
+ mon->target = src_pos;
}
// Now, break charms if appropriate.