hedgewars/uGearsHandlersMess.pas
changeset 10363 fc3aa563ab01
parent 10359 744f1151c707
child 10364 9f7be3da1245
--- a/hedgewars/uGearsHandlersMess.pas	Mon Jul 07 00:48:12 2014 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Jul 07 15:43:48 2014 +0200
@@ -981,14 +981,8 @@
     // if water entered or left
     if nuw <> uw then
         begin
-        if (gX > leftX) and (gY < rightX) then
-            begin
-            AddVisualGear(gX, cWaterLine, vgtSplash);
-            AddVisualGear(gX - 3 + Random(6), cWaterLine, vgtDroplet);
-            AddVisualGear(gX - 3 + Random(6), cWaterLine, vgtDroplet);
-            AddVisualGear(gX - 3 + Random(6), cWaterLine, vgtDroplet);
-            AddVisualGear(gX - 3 + Random(6), cWaterLine, vgtDroplet);
-            end;
+        if Gear^.Timer <> 5000 then
+            AddSplashForGear(Gear, false);
         StopSoundChan(Gear^.SoundChannel);
         if nuw then
             begin
@@ -1077,6 +1071,7 @@
     Gear^.X := Gear^.X + Gear^.dX;
     Gear^.Y := Gear^.Y + Gear^.dY;
     Gear^.dY := Gear^.dY + cGravity;
+    CheckGearDrowning(Gear);
     CheckCollision(Gear);
     if (Gear^.State and gstCollision) <> 0 then
         begin