Allow for arbitrary number of airstrike bombs and spacing.
authornemo
Sun, 13 Sep 2015 16:23:32 -0400
changeset 11170 22d8835beb4d
parent 11169 1b386b9e1be0
child 11171 546e75fdb879
Allow for arbitrary number of airstrike bombs and spacing.
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsList.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sun Sep 13 15:36:06 2015 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Sep 13 16:23:32 2015 -0400
@@ -2675,7 +2675,7 @@
             //4: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtWaterMelon, 0, cBombsSpeed *
             //                 Gear^.Tag, _0, 5000);
             end;
-        Gear^.dX := Gear^.dX + int2hwFloat(30 * Gear^.Tag);
+        Gear^.dX := Gear^.dX + int2hwFloat(Gear^.Damage * Gear^.Tag);
         if CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y)) then
             FollowGear^.State:= FollowGear^.State or gstSubmersible;
         StopSoundChan(Gear^.SoundChannel, 4000);
@@ -2708,7 +2708,7 @@
         end;
 
     Gear^.Y := int2hwFloat(topY-300);
-    Gear^.dX := int2hwFloat(Gear^.Target.X - 5 * Gear^.Tag * 15);
+    Gear^.dX := int2hwFloat(Gear^.Target.X) - int2hwFloat(Gear^.Tag * Gear^.Health * Gear^.Damage) / 2;
 
     // calcs for Napalm Strike, so that it will hit the target (without wind at least :P)
     if (Gear^.State = 2) then
--- a/hedgewars/uGearsList.pas	Sun Sep 13 15:36:06 2015 -0400
+++ b/hedgewars/uGearsList.pas	Sun Sep 13 16:23:32 2015 -0400
@@ -466,7 +466,8 @@
                 gear^.Tag:= Y
                 end;
    gtAirAttack: begin
-                gear^.Health:= 6;
+                gear^.Health:= 12;
+                gear^.Damage:= 30;
                 gear^.Z:= cHHZ+2;
                 gear^.Tint:= gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF
                 end;