diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-24 16:18:03 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-24 16:18:03 +0100 |
commit | f60ed1a40ececf01cb2f676c86508612251b22e9 (patch) | |
tree | 8551bcf1e60691d75ce9f03e7469c24abda7b5ac | |
parent | baf03926dbc0cba86290da8e0f07225e9fe77aa1 (diff) | |
download | crawl-ref-f60ed1a40ececf01cb2f676c86508612251b22e9.tar.gz crawl-ref-f60ed1a40ececf01cb2f676c86508612251b22e9.zip |
Fix wandering monsters always targetting the player if in sight.
-rw-r--r-- | crawl-ref/source/mon-behv.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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)) |