diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-11 00:40:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-11 00:40:03 +0300 |
commit | 5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2 (patch) | |
tree | 2b5bfa36d18d9c0f8c2c6508a2768382a9f49531 | |
parent | abf885752794754696351ae96640b6cf67a4b085 (diff) | |
download | manaplus-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.gz manaplus-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.bz2 manaplus-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.tar.xz manaplus-5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2.zip |
Fix incorrecly drawed collisions.
-rw-r--r-- | src/map.cpp | 4 |
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 ++) |