hedgewars/GSHandlers.inc
changeset 8992 5b0be812dcdb
parent 8990 e64a1a851b69
child 8993 839ce342474a
--- a/hedgewars/GSHandlers.inc	Tue May 14 07:16:14 2013 -0400
+++ b/hedgewars/GSHandlers.inc	Tue May 14 08:57:30 2013 -0400
@@ -178,6 +178,12 @@
     if Gear^.dY.Round > 2 then
         Gear^.dY.QWordValue:= 8589934592;
 
+    if (Gear^.State and gstSubmersible <> 0) and (hwRound(Gear^.Y) > cWaterLine) then
+        begin
+        Gear^.dX:= Gear^.dX * _0_999;
+        Gear^.dY:= Gear^.dY * _0_999
+        end;
+
     Gear^.State := Gear^.State and (not gstCollision);
     collV := 0;
     collH := 0;
@@ -185,6 +191,7 @@
     tdY := Gear^.dY;
 
 
+
 // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips)
     if (hwRound(Gear^.X) < min(LAND_WIDTH div -2, -2048))
     or (hwRound(Gear^.X) > max(LAND_WIDTH * 3 div 2, 6144)) then