summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 01:52:58 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 01:52:58 +0000
commit15431f7e0c81d5df0144ab511c3cbd52b7e1d7cc (patch)
treeaa070921055190ce211d9ed36a7e9b031ca34aa2 /crawl-ref/source/output.cc
parent086ba6c2bab2012096f899b22d280c544450366b (diff)
downloadcrawl-ref-15431f7e0c81d5df0144ab511c3cbd52b7e1d7cc.tar.gz
crawl-ref-15431f7e0c81d5df0144ab511c3cbd52b7e1d7cc.zip
Fixed problem with monsters on edge of vision not being listed. Might
be bug 1946671. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5625 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 81e1ef11be..db0f5e1c7e 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -1089,14 +1089,14 @@ static void _get_visible_monsters(std::vector<std::string>& describe)
int yend = you.y_pos + 9, xend = you.x_pos + 9;
if ( xstart < 0 ) xstart = 0;
if ( ystart < 0 ) ystart = 0;
- if ( xend >= GXM ) xend = GXM;
- if ( yend >= GYM ) yend = GYM;
+ if ( xend >= GXM ) xend = GXM - 1;
+ if ( yend >= GYM ) yend = GYM - 1;
std::vector<const monsters*> mons;
// 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)
if (see_grid(x,y))
{
const unsigned short targ_monst = mgrd[x][y];