make water sentries more resistant to sinking
authoralfadur
Thu, 16 Jul 2020 22:30:32 +0300
changeset 15724 ff7291bc811f
parent 15723 4e65fd69f58c
child 15725 4e1ea1bdd803
make water sentries more resistant to sinking
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sun Jul 12 03:03:52 2020 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Jul 16 22:30:32 2020 +0300
@@ -7523,7 +7523,7 @@
     end;
 
     Gear^.Y := int2hwFloat(cWaterLine - 3 * Gear^.Radius);
-    if TestCollisionYwithGear(Gear, -1) <> 0 then
+    if TestCollisionYImpl(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius - 1, -1, Gear^.CollisionMask and lfLandMask) <> 0 then
     begin
         Gear^.Tag := -1;
         exit;