hedgewars/uGearsHandlersMess.pas
changeset 14567 5de4d470dafe
parent 14566 85921db6f7c3
child 14568 e26fa5ea2bf6
--- a/hedgewars/uGearsHandlersMess.pas	Sun Jan 13 17:28:33 2019 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Jan 13 17:49:29 2019 +0100
@@ -3047,18 +3047,16 @@
 procedure doStepAirAttack(Gear: PGear);
 var valid: boolean;
     HHGear: PGear;
-    planeY: LongInt;
 begin
     AllInactive := false;
 
-    planeY:= topY - 300;
     valid:= true;
     if (WorldEdge = weBounce) then
         if (Gear^.X.QWordValue = 0) and (Gear^.Target.X > rightX) then
             valid:= false
         else if (Gear^.X.QWordValue <> 0) and (Gear^.Target.X < leftX) then
             valid:= false
-        else if (Gear^.Target.Y < planeY) then
+        else if (Gear^.Target.Y < (topY - 50)) then
             valid:= false;
 
     if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then
@@ -3092,7 +3090,7 @@
         Gear^.X := int2hwFloat(max(LAND_WIDTH,4096) + 2048);
         end;
 
-    Gear^.Y := int2hwFloat(planeY);
+    Gear^.Y := int2hwFloat(topY - 300);
     Gear^.dX := int2hwFloat(Gear^.Target.X) - int2hwFloat(Gear^.Tag * (Gear^.Health-1) * Gear^.Damage) / 2;
 
     // calcs for Napalm Strike, so that it will hit the target (without wind at least :P)