equal
deleted
inserted
replaced
2767 |
2767 |
2768 LandFlags:= 0; |
2768 LandFlags:= 0; |
2769 if Gear^.AmmoType = amRubber then LandFlags:= lfBouncy |
2769 if Gear^.AmmoType = amRubber then LandFlags:= lfBouncy |
2770 else if cIce then LandFlags:= lfIce; |
2770 else if cIce then LandFlags:= lfIce; |
2771 |
2771 |
2772 distFail:= ((Distance(tx - x, ty - y) > _256) and ((WorldEdge <> weWrap) or |
2772 distFail:= (cBuildMaxDist > 0) and ((hwRound(Distance(tx - x, ty - y)) > cBuildMaxDist) and ((WorldEdge <> weWrap) or |
2773 ( |
2773 ( |
2774 (Distance(tx - int2hwFloat(rightX+(rx-leftX)), ty - y) > _256) and |
2774 (hwRound(Distance(tx - int2hwFloat(rightX+(rx-leftX)), ty - y)) > cBuildMaxDist) and |
2775 (Distance(tx - int2hwFloat(leftX-(rightX-rx)), ty - y) > _256) |
2775 (hwRound(Distance(tx - int2hwFloat(leftX-(rightX-rx)), ty - y)) > cBuildMaxDist) |
2776 ))); |
2776 ))); |
2777 if distFail |
2777 if distFail |
2778 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 |
2778 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 |
2779 begin |
2779 begin |
2780 PlaySound(sndDenied); |
2780 PlaySound(sndDenied); |