Might want the snow actually showing up. Also disable it while rope is active due to bad side effects.
authornemo
Thu, 23 Dec 2010 18:06:09 -0500
changeset 4655 b75bb4307b0f
parent 4653 913460abf897
child 4656 59e75518fb82
Might want the snow actually showing up. Also disable it while rope is active due to bad side effects.
hedgewars/GSHandlers.inc
--- 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