summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
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
parentf7274ebf7b56aecaebd2207582ce37879a47b697 (diff)
downloadcrawl-ref-32792aa54bd2f43849a6864391d8e16afb5b3dd3.tar.gz
crawl-ref-32792aa54bd2f43849a6864391d8e16afb5b3dd3.zip
Simplify.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/mon-behv.cc10
-rw-r--r--crawl-ref/source/mon-cast.cc4
2 files changed, 7 insertions, 7 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.
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 9e16f927b6..74f99e15d2 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -2477,9 +2477,9 @@ void mons_cast_noise(monsters *monster, bolt &pbolt, spell_type spell_cast)
msg = replace_all(msg, "@beam@", beam_name);
const msg_channel_type chan =
- (unseen ? MSGCH_SOUND :
+ (unseen ? MSGCH_SOUND :
mons_friendly(monster) ? MSGCH_FRIEND_SPELL
- : MSGCH_MONSTER_SPELL);
+ : MSGCH_MONSTER_SPELL);
if (silent)
mons_speaks_msg(monster, msg, chan, true);