Fix water on ice setting
authorUrbertar@gmail.com
Sun, 03 Mar 2013 19:35:57 +0200
changeset 8628 627e76986a08
parent 8626 cfc44db21d72
child 8630 91ad5fe4f1d5
Fix water on ice setting
hedgewars/GSHandlers.inc
hedgewars/uGearsRender.pas
hedgewars/uLandGraphics.pas
--- a/hedgewars/GSHandlers.inc	Sun Mar 03 19:32:48 2013 +0200
+++ b/hedgewars/GSHandlers.inc	Sun Mar 03 19:35:57 2013 +0200
@@ -5182,14 +5182,14 @@
                     begin 
                     FillRoundInLandWithIce(Target.X, Target.Y, iceRadius);
                     SetAllHHToActive;                                     
-                    IceState := iceWaitNextTarget;
+                    IceState := iceWaitCollision;
                     end;
 
                 if (IceState = iceCollideWithWater) and ((GameTicks - IceTime) > groundFreezingTime) then
                     begin                    
                     DrawIceBreak(Target.X, cWaterLine - iceHeight, iceRadius, iceHeight);
                     SetAllHHToActive; 
-                    IceState := iceWaitNextTarget;
+                    IceState := iceWaitCollision;
                     end;
 
 // freeze nearby hogs
--- a/hedgewars/uGearsRender.pas	Sun Mar 03 19:32:48 2013 +0200
+++ b/hedgewars/uGearsRender.pas	Sun Mar 03 19:35:57 2013 +0200
@@ -1271,8 +1271,13 @@
                                 begin
                                 i:= random(100)+100;
                                 if Gear^.Target.X <> NoPointX then
-                                    DrawLine(Gear^.Target.X, Gear^.Target.Y, hwRound(HHGear^.X), hwRound(HHGear^.Y), 4.0, i, i, $FF, $40)
-                                else DrawLine(hwRound(HHGear^.X), hwRound(HHGear^.Y), hwRound(Gear^.X), hwRound(Gear^.Y), 4.0, i, i, $FF, $40);
+                                    begin
+                                    DrawLine(Gear^.Target.X, Gear^.Target.Y, hwRound(HHGear^.X), hwRound(HHGear^.Y), 4.0, i, i, $FF, $40);
+                                    end
+                                else
+                                    begin
+                                    DrawLine(hwRound(HHGear^.X), hwRound(HHGear^.Y), hwRound(Gear^.X), hwRound(Gear^.Y), 4.0, i, i, $FF, $40);                                    
+                                    end;
                                 end
                           end
                       end;
--- a/hedgewars/uLandGraphics.pas	Sun Mar 03 19:32:48 2013 +0200
+++ b/hedgewars/uLandGraphics.pas	Sun Mar 03 19:35:57 2013 +0200
@@ -265,7 +265,7 @@
            (j < 0) or
            (j > LAND_HEIGHT -1) then
            begin               
-           result := 0;
+           result := 9;
            exit;
            end;