From 9338556ebf846bbc4176134e3846ef6699e8434b Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Mon, 9 Nov 2009 14:33:06 +0300 Subject: Replace mons_wont_attack with monsters::wont_attack. --- crawl-ref/source/monspeak.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monspeak.cc') diff --git a/crawl-ref/source/monspeak.cc b/crawl-ref/source/monspeak.cc index ef0547010a..3241200ae1 100644 --- a/crawl-ref/source/monspeak.cc +++ b/crawl-ref/source/monspeak.cc @@ -430,7 +430,7 @@ bool mons_speaks(monsters *monster) if (confused) prefixes.push_back("confused"); - const actor* foe = (!crawl_state.arena && mons_wont_attack(monster) + const actor* foe = (!crawl_state.arena && monster->wont_attack() && invalid_monster_index(monster->foe)) ? &you : monster->get_foe(); const monsters* m_foe = (foe && foe->atype() == ACT_MONSTER) ? @@ -494,7 +494,7 @@ bool mons_speaks(monsters *monster) const bool no_foe = (foe == NULL); const bool no_player = crawl_state.arena - || (!mons_wont_attack(monster) + || (!monster->wont_attack() && (!foe || foe->atype() != ACT_PLAYER)); const bool mon_foe = (m_foe != NULL); const bool no_god = no_foe || (mon_foe && foe->deity() == GOD_NO_GOD); -- cgit v1.2.3-54-g00ecf