summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-11 00:40:03 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-11 00:40:03 +0300
commit5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2 (patch)
tree2b5bfa36d18d9c0f8c2c6508a2768382a9f49531 /src/map.cpp
parentabf885752794754696351ae96640b6cf67a4b085 (diff)
downloadmv-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.gz
mv-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.bz2
mv-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.xz
mv-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.zip
Fix incorrecly drawed collisions.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index d35133bcc..e9ce78bd0 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -696,7 +696,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
- if (!getWalk(x, y, BLOCKMASK_AIR))
+ if (x < endX && !getWalk(x, y, BLOCKMASK_AIR))
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)
@@ -718,7 +718,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY,
}
}
- if (!getWalk(x, y, BLOCKMASK_WATER))
+ if (x < endX && !getWalk(x, y, BLOCKMASK_WATER))
{
width = 32;
for (int x2 = x + 1; x < endX; x2 ++)