summaryrefslogtreecommitdiff
path: root/src/simulation/Gravity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/Gravity.cpp')
-rw-r--r--src/simulation/Gravity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp
index e5daa65..552c02d 100644
--- a/src/simulation/Gravity.cpp
+++ b/src/simulation/Gravity.cpp
@@ -420,13 +420,13 @@ void Gravity::grav_mask_r(int x, int y, char checkmap[YRES/CELL][XRES/CELL], cha
*shapeout = 1;
int x1 = x, x2 = x;
- while (x1 >= 0)
+ while (x1 >= 1)
{
if(checkmap[y][x1-1] || bmap[y][x1-1]==WL_GRAV)
break;
x1--;
}
- while (x2 < XRES/CELL)
+ while (x2 < (XRES/CELL)-1)
{
if(checkmap[y][x2+1] || bmap[y][x2+1]==WL_GRAV)
break;