diff options
author | DracoOmega <draco_omega@live.com> | 2014-01-17 14:46:57 -0330 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2014-01-18 00:17:06 -0330 |
commit | 2cbd564df629498722f101057aaa1a63ae49661c (patch) | |
tree | 7bdf7dac76d0045a427587eb21d649b38e0b612e /crawl-ref/source/mon-behv.cc | |
parent | 99368b90bd8da7ae8cd1e3159c7696a9c18033c6 (diff) | |
download | crawl-ref-2cbd564df629498722f101057aaa1a63ae49661c.tar.gz crawl-ref-2cbd564df629498722f101057aaa1a63ae49661c.zip |
Remove redundant checks for M_FLEEING
It was only ever checked at the same time as mons_is_fleeing(), which
itself already checked for this flag.
Moreover, the flag doesn't seem to ever be used by anything, so maybe
it should just be removed itself?
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r-- | crawl-ref/source/mon-behv.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc index e74a27ffb2..5ada2183ee 100644 --- a/crawl-ref/source/mon-behv.cc +++ b/crawl-ref/source/mon-behv.cc @@ -1270,8 +1270,7 @@ void behaviour_event(monster* mon, mon_event_type event, const actor *src, if (event != ME_WHACK && !mon->has_ench(ENCH_INSANE) && (wontAttack == sourceWontAttack && mons_intel(mon) <= I_PLANT - || mons_is_fleeing(mon) - || mons_class_flag(mon->type, M_FLEEING))) + || mons_is_fleeing(mon))) { break; } @@ -1368,8 +1367,7 @@ void behaviour_event(monster* mon, mon_event_type event, const actor *src, // Will alert monster to <src> and turn them // against them, unless they have a current foe. // It won't turn friends hostile either. - if ((!mons_is_fleeing(mon) || mons_class_flag(mon->type, M_FLEEING)) - && !mons_is_retreating(mon) + if (!mons_is_fleeing(mon) && !mons_is_retreating(mon) && !mons_is_cornered(mon)) { mon->behaviour = BEH_SEEK; |