From 5969220af9a8d9ff1958cf64cbbaa9bbf911e8d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 May 2011 00:40:03 +0300 Subject: Fix incorrecly drawed collisions. --- src/map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map.cpp') 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 ++) -- cgit v1.2.3-60-g2f50