Make it a bit easier/safer to build ice bridges
authornemo
Wed, 17 Sep 2014 23:03:24 -0400
changeset 10411 ee4e6d392b31
parent 10409 0972bf43e8fc
child 10413 afd746a538ef
Make it a bit easier/safer to build ice bridges
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Tue Sep 09 10:48:11 2014 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Wed Sep 17 23:03:24 2014 -0400
@@ -5569,7 +5569,10 @@
                         Power := GameTicks;
                         end
                     end
-                else if (target.y >= cWaterLine) then
+                else if (Target.Y >= cWaterLine) or 
+                        ((Target.X and LAND_WIDTH_MASK = 0) and 
+                         (Target.Y+iceHeight+4 >= cWaterLine) and 
+                         (Land[Target.Y, Target.X] = lfIce)) then
                     begin
                     if Timer = iceWaitCollision then
                         begin
@@ -5646,7 +5649,7 @@
                     Timer := iceWaitCollision;
                     end;
 
-                if (Timer = iceCollideWithWater) and ((GameTicks - Power) > groundFreezingTime) then
+                if (Timer = iceCollideWithWater) and ((GameTicks - Power) > groundFreezingTime div 2) then
                     begin
                     PlaySound(sndHogFreeze);
                     DrawIceBreak(Target.X, cWaterLine - iceHeight, iceRadius, iceHeight);