crosshair on hog won't cause a direct hit anymore
authornemo
Tue, 09 Feb 2016 15:10:01 -0500
changeset 11540 1ae92bbb5a6d
parent 11539 c22d292e7266
child 11541 34a0181d5be5
crosshair on hog won't cause a direct hit anymore
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Tue Feb 09 14:40:06 2016 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Tue Feb 09 15:10:01 2016 -0500
@@ -2646,7 +2646,7 @@
     AllInactive := false;
     Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag;
 
-    if (Gear^.Health > 0)and(not (Gear^.X < Gear^.dX))and(Gear^.X < Gear^.dX + cAirPlaneSpeed) then
+    if (Gear^.Health > 0) and (not (Gear^.X < Gear^.dX)) and (Gear^.X < Gear^.dX + cAirPlaneSpeed) then
         begin
         dec(Gear^.Health);
             case Gear^.State of
@@ -2690,7 +2690,7 @@
         end;
 
     Gear^.Y := int2hwFloat(topY-300);
-    Gear^.dX := int2hwFloat(Gear^.Target.X) - int2hwFloat(Gear^.Tag * Gear^.Health * Gear^.Damage) / 2;
+    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)
     if (Gear^.State = 2) then