hedgewars/GSHandlers.inc
changeset 4655 b75bb4307b0f
parent 4642 d9e7d173e6a7
child 4691 d07fa8480491
--- a/hedgewars/GSHandlers.inc	Thu Dec 23 20:46:51 2010 +0100
+++ b/hedgewars/GSHandlers.inc	Thu Dec 23 18:06:09 2010 -0500
@@ -594,42 +594,45 @@
             begin
             // we've collided with land. draw some stuff and get back into the clouds
             move:= true;
-////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
-            if cWindSpeed * 1600 + dX < _0 then i:= -1
-            else i:= 1;
-            if (yy > 0) and ((Land[yy-1, xx] and $FF00) = 0) then dec(yy)
-            else dec(xx, i);
-            dec(yy,2);
-            dec(xx,i);
-            s:= SpritesData[sprSnow].Surface;
-            p:= s^.pixels;
-            allpx:= true;
-            for py:= 0 to Pred(s^.h) do
+            if (CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtRope) then
                 begin
-                for px:= 0 to Pred(s^.w) do
-                    if ((yy + py and LAND_HEIGHT_MASK) = 0) and ((xx + px and LAND_WIDTH_MASK) = 0) and 
-                       ((Land[yy + py, xx + px] and $FF00) = 0) then
-                        begin
-                        if (cReducedQuality and rqBlurryLand) = 0 then
-                            LandPixels[yy + py, xx + px]:= p^[px]
-                        else
-                            LandPixels[(yy + py) div 2, (xx + px) div 2]:= p^[px]
-                        end
-                    else allpx:= false;
-                p:= @(p^[s^.pitch shr 2])
-                end;
-            if allpx then UpdateLandTexture(xx, 4, yy, 4)
-            else UpdateLandTexture(xx, 1, yy, 1);
-            inc(yy,2);
-            inc(xx,i);
-            if ((xx and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx]:= Land[yy, xx] or lfObject;
-            if yy > 0 then
-                begin 
-                Land[yy-1, xx]:= Land[yy-1, xx] or lfObject;
-                if ((xx-i and LAND_WIDTH_MASK) = 0) then Land[yy-1, xx-i]:= Land[yy-1, xx-i] or lfObject;
-                end;
-            if ((xx-i and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx-i]:= Land[yy, xx-i] or lfObject
 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
+                if cWindSpeed * 1600 + dX < _0 then i:= -1
+                else i:= 1;
+                if (yy > 0) and ((Land[yy-1, xx] and $FF00) = 0) then dec(yy)
+                else dec(xx, i);
+                dec(yy,2);
+                dec(xx,i);
+                s:= SpritesData[sprSnow].Surface;
+                p:= s^.pixels;
+                allpx:= true;
+                for py:= 0 to Pred(s^.h) do
+                    begin
+                    for px:= 0 to Pred(s^.w) do
+                        if (((yy + py) and LAND_HEIGHT_MASK) = 0) and (((xx + px) and LAND_WIDTH_MASK) = 0) and 
+                           ((Land[yy + py, xx + px] and $FF00) = 0) then
+                            begin
+                            if (cReducedQuality and rqBlurryLand) = 0 then
+                                LandPixels[yy + py, xx + px]:= p^[px]
+                            else
+                                LandPixels[(yy + py) div 2, (xx + px) div 2]:= p^[px]
+                            end
+                        else allpx:= false;
+                    p:= @(p^[s^.pitch shr 2])
+                    end;
+                if allpx then UpdateLandTexture(xx, 4, yy, 4)
+                else if ((yy and LAND_HEIGHT_MASK) = 0) and ((xx and LAND_WIDTH_MASK) = 0) then UpdateLandTexture(xx, 1, yy, 1);
+                inc(yy,2);
+                inc(xx,i);
+                if ((xx and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx]:= Land[yy, xx] or lfObject;
+                if yy > 0 then
+                    begin 
+                    Land[yy-1, xx]:= Land[yy-1, xx] or lfObject;
+                    if ((xx-i and LAND_WIDTH_MASK) = 0) then Land[yy-1, xx-i]:= Land[yy-1, xx-i] or lfObject;
+                    end;
+                if ((xx-i and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx-i]:= Land[yy, xx-i] or lfObject
+////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
+                end
             end;
         if move then
             begin