From f60ed1a40ececf01cb2f676c86508612251b22e9 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 24 Nov 2009 16:18:03 +0100 Subject: Fix wandering monsters always targetting the player if in sight. --- crawl-ref/source/mon-behv.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/mon-behv.cc') diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc index 02cecb0ab9..e098c3efd0 100644 --- a/crawl-ref/source/mon-behv.cc +++ b/crawl-ref/source/mon-behv.cc @@ -615,10 +615,12 @@ static bool _mons_check_foe(monsters *mon, const coord_def& p, if (!in_bounds(p)) return (false); - if (!friendly && !neutral && p == you.pos() - && you.visible_to(mon) && !is_sanctuary(p)) + if (p == you.pos()) { - return (true); + // The player: We don't return true here because + // otherwise wandering monsters will always + // attack the player. + return (false); } if (monsters *foe = monster_at(p)) -- cgit v1.2.3-54-g00ecf