Fix rubber duck speed when hitting sea edge initially
authorWuzzy <almikes@aol.com>
Thu, 12 May 2016 19:22:53 +0200
changeset 12200 02f6d786627d
parent 12199 f7c295971143
child 12201 2c0811bbc1d9
Fix rubber duck speed when hitting sea edge initially
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu May 12 18:16:09 2016 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Thu May 12 19:22:53 2016 +0200
@@ -6393,7 +6393,11 @@
     if Gear^.Pos = 1 then
         Gear^.dX:= cWindSpeed * 500
     else if Gear^.Pos = 2 then
-        Gear^.dX:= -cWindSpeed * 500;
+        Gear^.dX:= -cWindSpeed * 500
+    else if Gear^.Pos = 3 then
+        Gear^.dY:= cWindSpeed * 500
+    else if Gear^.Pos = 4 then
+        Gear^.dY:= -cWindSpeed * 500;
     
     // Rotate duck and change direction when reaching Sea world edge (Pos 3 or 4)
     if WorldEdge = weSea then
@@ -6407,7 +6411,7 @@
                 Gear^.Angle:= 90 
             else
                 Gear^.Angle:= 270;
-            Gear^.dY:= Gear^.dX;
+            Gear^.dY:= cWindSpeed * 500;
             Gear^.dX:= _0;
             end
         // Right edge
@@ -6419,7 +6423,7 @@
                 Gear^.Angle:= 270
             else
                 Gear^.Angle:= 90;
-            Gear^.dY:= -Gear^.dX;
+            Gear^.dY:= -cWindspeed * 500;
             Gear^.dX:= _0;
             end;
         end;