hedgewars/uCollisions.pas
changeset 1966 31e449e1d9dd
parent 1753 2ccba26f1aa4
child 2599 c7153d2348f3
--- a/hedgewars/uCollisions.pas	Sun Apr 12 12:51:25 2009 +0000
+++ b/hedgewars/uCollisions.pas	Sun Apr 12 15:24:08 2009 +0000
@@ -118,7 +118,7 @@
            IntersectGear:= nil;
            TestWord:= 0
            end else
-           TestWord:= COLOR_LAND - 1
+           TestWord:= 255
    else TestWord:= 0;
 
 x:= hwRound(Gear^.X);
@@ -149,7 +149,7 @@
            IntersectGear:= nil;
            TestWord:= 0
            end else
-           TestWord:= COLOR_LAND - 1
+           TestWord:= 255
    else TestWord:= 0;
 
 y:= hwRound(Gear^.Y);
@@ -182,7 +182,7 @@
    i:= y + Gear^.Radius * 2 - 2;
    repeat
      if (y and LAND_HEIGHT_MASK) = 0 then
-           if Land[y, x] = COLOR_LAND then exit(true)
+           if Land[y, x] > 255 then exit(true)
            else if Land[y, x] <> 0 then flag:= true;
      inc(y)
    until (y > i);
@@ -233,7 +233,7 @@
    repeat
      if (x and LAND_WIDTH_MASK) = 0 then
         if Land[y, x] > 0 then
-           if Land[y, x] = COLOR_LAND then exit(true)
+           if Land[y, x] > 255 then exit(true)
            else if Land[y, x] <> 0 then flag:= true;
      inc(x)
    until (x > i);
@@ -291,7 +291,7 @@
    i:= x + Gear^.Radius * 2 - 2;
    repeat
      if (x and LAND_WIDTH_MASK) = 0 then
-        if Land[y, x] = COLOR_LAND then exit(true);
+        if Land[y, x] > 255 then exit(true);
      inc(x)
    until (x > i);
    end;