hedgewars/GSHandlers.inc
changeset 7309 5bb4bd846c87
parent 7305 b242e91a92a9
child 7310 7f8d62b869bd
--- a/hedgewars/GSHandlers.inc	Wed Jun 27 07:58:16 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Jun 27 08:54:03 2012 -0400
@@ -4411,12 +4411,13 @@
     ty := 0;
     // avoid compiler hints
 
-    if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] and ($FF00 and not lfBouncy) <> 0) then
+    if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] > 255) then
         begin
         Gear^.State := Gear^.State or gstCollision;
         Gear^.State := Gear^.State and (not gstMoving);
         
         if not CalcSlopeTangent(Gear, x, y, tx, ty, 255)
+        or (Land[y, x] and lfBouncy <> 0)
         or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
             begin
             loadNewPortalBall(Gear, true);