diff options
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 56a818507c..d7a03f82f3 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -3051,6 +3051,8 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, return (did_map); } +// Is the given monster near (in LOS of) the given foe's +// position (the player by default)? bool mons_near(const monsters *monster, unsigned short foe) { // Early out -- no foe! @@ -3065,9 +3067,9 @@ bool mons_near(const monsters *monster, unsigned short foe) } // Must be a monster. - const monsters *myFoe = &menv[foe]; - if (myFoe->alive()) - return (monster->mon_see_cell(myFoe->pos())); + const monsters *foemons = &menv[foe]; + if (foemons->alive()) + return (monster->mon_see_cell(foemons->pos())); return (false); } |