diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-07 12:33:40 +0300 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-07 19:52:53 +1000 |
commit | 3232b4719ebfaccae12c628b01c6ca37ad38254e (patch) | |
tree | e95548b672dddc54a27c8fe3124809a82ef0b914 /crawl-ref/source/mon-behv.cc | |
parent | 19c21942c0fd98b8034920f9bebd96bc8a8a5261 (diff) | |
download | crawl-ref-3232b4719ebfaccae12c628b01c6ca37ad38254e.tar.gz crawl-ref-3232b4719ebfaccae12c628b01c6ca37ad38254e.zip |
Replace mons_neutral with monsters::neutral.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r-- | crawl-ref/source/mon-behv.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc index cf65f76b01..a5822cc401 100644 --- a/crawl-ref/source/mon-behv.cc +++ b/crawl-ref/source/mon-behv.cc @@ -1085,7 +1085,7 @@ void handle_behaviour(monsters *mon) { bool changed = true; bool isFriendly = mon->friendly(); - bool isNeutral = mons_neutral(mon); + bool isNeutral = mon->neutral(); bool wontAttack = mons_wont_attack(mon); // Whether the player is in LOS of the monster and can see @@ -1229,7 +1229,7 @@ void handle_behaviour(monsters *mon) // Neutral monsters prefer not to attack players, or other neutrals. if (isNeutral && mon->foe != MHITNOT - && (mon->foe == MHITYOU || mons_neutral(&menv[mon->foe]))) + && (mon->foe == MHITYOU || menv[mon->foe].neutral())) { mon->foe = MHITNOT; } @@ -1606,7 +1606,7 @@ static bool _mons_check_foe(monsters *mon, const coord_def& p, && mon->can_see(foe) && (friendly || !is_sanctuary(p)) && (foe->friendly() != friendly - || (neutral && !mons_neutral(foe)))) + || (neutral && !foe->neutral()))) { return (true); } @@ -1618,7 +1618,7 @@ static bool _mons_check_foe(monsters *mon, const coord_def& p, void _set_nearest_monster_foe(monsters *mon) { const bool friendly = mon->friendly(); - const bool neutral = mons_neutral(mon); + const bool neutral = mon->neutral(); for (int k = 1; k <= LOS_RADIUS; ++k) { |