summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 02:12:28 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 02:12:28 +0000
commit8d0ff904180d271bb7c87b46cfe728624cc5fba3 (patch)
tree36d2d7dde2e5a573697c017200a8c77a3ac44f15 /crawl-ref/source/xom.cc
parent187f5ddc800d1d8a779bbcfdb1af22f78f8c678d (diff)
downloadcrawl-ref-8d0ff904180d271bb7c87b46cfe728624cc5fba3.tar.gz
crawl-ref-8d0ff904180d271bb7c87b46cfe728624cc5fba3.zip
Apply zelgadis' fix from r5625 to three other places that need it.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5627 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 09af8d47ed..4480bcafab 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -388,13 +388,13 @@ bool there_are_monsters_nearby()
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;
// Monster check.
- for (int y = ystart; y < yend; ++y)
+ for (int y = ystart; y <= yend; ++y)
{
- for (int x = xstart; x < xend; ++x)
+ for (int x = xstart; x <= xend; ++x)
{
// If you can see a monster, then it's nearby.
if (see_grid(x, y))