hedgewars/uVisualGearsHandlers.pas
changeset 15243 df5890e5a12a
parent 14662 b390479f24c1
child 15244 de53425ebc39
--- a/hedgewars/uVisualGearsHandlers.pas	Thu Jul 11 22:31:29 2019 +0200
+++ b/hedgewars/uVisualGearsHandlers.pas	Thu Jul 11 23:53:30 2019 +0200
@@ -470,7 +470,7 @@
 Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
 Gear^.dY:= Gear^.dY + cGravityf * Steps;
 
-if round(Gear^.Y) > cWaterLine then
+if CheckCoordInWater(round(Gear^.X), round(Gear^.Y)) then
     begin
     DeleteVisualGear(Gear);
     PlaySound(TSound(ord(sndDroplet1) + Random(3)));
@@ -848,7 +848,7 @@
 
 Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle;
 
-if (round(Gear^.Y) > cWaterLine) and ((cReducedQuality and rqPlainSplash) = 0) then
+if ((cReducedQuality and rqPlainSplash) = 0) and (CheckCoordInWater(round(Gear^.X), round(Gear^.Y))) then
     begin
     AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtDroplet);
     DeleteVisualGear(Gear);