--- a/hedgewars/uGearsHandlersMess.pas Mon Jul 15 20:46:50 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Mon Jul 15 21:13:01 2019 +0200
@@ -349,8 +349,21 @@
DeleteGear(Gear);
exit;
end;
-// Delete normally if gear is outside of visible range
-if (hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater) then
+// Delete gear normally if it is outside of visible range.
+// But first determine size tolerance for big gears to make sure the gear is REALLY out of range.
+if Gear^.Kind = gtPiano then
+ d:= SpritesData[sprPiano].height
+else if Gear^.Kind = gtRCPlane then
+ d:= SpritesData[sprPlane].width
+else if Gear^.Kind = gtKnife then
+ d:= SpritesData[sprKnife].height
+else if Gear^.Kind = gtDynamite then
+ d:= SpritesData[sprDynamite].height
+else if Gear^.Kind = gtSnowball then
+ d:= SpritesData[sprSnowball].height
+else
+ d:= Gear^.Radius * 2;
+if (hwRound(Gear^.Y) > d + cWaterLine + cVisibleWater) then
DeleteGear(Gear);
end;