diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-09 02:38:36 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-09 02:38:36 +0000 |
commit | f98e8b06b0f7431afa6a25f6577066bf4a43942f (patch) | |
tree | 9fe972706fa685ae5ddfebcb03b25eb361264eff /crawl-ref/source/misc.cc | |
parent | 8d0ff904180d271bb7c87b46cfe728624cc5fba3 (diff) | |
download | crawl-ref-f98e8b06b0f7431afa6a25f6577066bf4a43942f.tar.gz crawl-ref-f98e8b06b0f7431afa6a25f6577066bf4a43942f.zip |
Add still more miscellaneous minor fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5628 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index cfd8e6a52e..342e7f96ae 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2672,15 +2672,17 @@ void get_playervisible_monsters(std::vector<monsters*> &mons, const int xend = MIN(GXM - 1, you.x_pos + range); // Monster check. - for (int y = ystart; y <= yend; y++) - for (int x = xstart; x <= xend; x++) + for (int y = ystart; y <= yend; ++y) + { + for (int x = xstart; x <= xend; ++x) { const unsigned short targ_monst = env.mgrid[x][y]; if (targ_monst != NON_MONSTER) { - if (see_grid(x,y)) + if (see_grid(x, y)) { monsters *mon = &env.mons[targ_monst]; + if (player_monster_visible(mon) && !mons_is_submerged(mon) && (!mons_is_mimic(mon->type) @@ -2697,6 +2699,7 @@ void get_playervisible_monsters(std::vector<monsters*> &mons, } } } + } } bool i_feel_safe(bool announce, bool want_move, bool just_monsters, int range) |