hedgewars/uGearsHandlersMess.pas
changeset 15307 9299f43ba0ec
parent 15302 6afce21e60c3
child 15332 2196aa902d2d
--- a/hedgewars/uGearsHandlersMess.pas	Tue Aug 06 23:28:14 2019 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Tue Aug 06 23:47:02 2019 +0300
@@ -3317,6 +3317,7 @@
             (hwRound(Distance(tx - int2hwFloat(leftX-(rightX-rx)), ty - y)) > cBuildMaxDist)
             )));
     if distFail
+    or CheckGearsUnderSprite(Ammoz[Gear^.AmmoType].PosSprite, Gear^.Target.X - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Width div 2, Gear^.Target.Y - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Height div 2, Gear^.State)
     or (not TryPlaceOnLand(Gear^.Target.X - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Width div 2, Gear^.Target.Y - SpritesData[Ammoz[Gear^.AmmoType].PosSprite].Height div 2, Ammoz[Gear^.AmmoType].PosSprite, Gear^.State, true, LandFlags)) then
         begin
         PlaySound(sndDenied);