Change bee pos sprite, make aiming napalm a little easier, adjust napalm flames to be more centred on the target
authornemo
Sun, 03 Jul 2011 11:24:53 -0400
changeset 5372 7283bc768228
parent 5370 a3f87be7b09a
child 5374 7a7ce10bee53
Change bee pos sprite, make aiming napalm a little easier, adjust napalm flames to be more centred on the target
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
hedgewars/uVariables.pas
hedgewars/uWorld.pas
--- a/hedgewars/GSHandlers.inc	Sun Jul 03 02:33:17 2011 +0200
+++ b/hedgewars/GSHandlers.inc	Sun Jul 03 11:24:53 2011 -0400
@@ -2407,7 +2407,7 @@
 
     // calcs for Napalm Strike, so that it will hit the target (without wind at least :P)
     if (Gear^.State = 2) then
-        Gear^.dX := Gear^.dX - cBombsSpeed * Gear^.Tag * 1000 // ^.Timer of gtNapalmBomb, make it a constant var if you prefer that :P
+        Gear^.dX := Gear^.dX - cBombsSpeed * Gear^.Tag * 900 
     // calcs for regular falling gears
     else if (int2hwFloat(TargetPoint.Y) - Gear^.Y > _0) then
             Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(TargetPoint.Y) - Gear^.Y) * 2 /
--- a/hedgewars/HHHandlers.inc	Sun Jul 03 02:33:17 2011 +0200
+++ b/hedgewars/HHHandlers.inc	Sun Jul 03 11:24:53 2011 -0400
@@ -285,6 +285,8 @@
                     // we save CurWeapon^.Pos (in this case: cursor direction) by using it as (otherwise irrelevant) X value of the new gear.
                     amAirAttack: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 0, _0, _0, 0);
                    amMineStrike: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 1, _0, _0, 0);
+                  amDrillStrike: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, CurWeapon^.Timer);
+                       amNapalm: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0);
                     amBlowTorch: newGear:= AddGear(hwRound(lx), hwRound(ly), gtBlowTorch, 0, SignAs(_0_5, dX), _0, 0);
                        amGirder: newGear:= AddGear(0, 0, gtGirder, CurWeapon^.Pos, _0, _0, 0);
                      amTeleport: newGear:= AddGear(CurWeapon^.Pos, 0, gtTeleport, 0, _0, _0, 0);
@@ -302,7 +304,6 @@
                     amSeduction: newGear:= AddGear(hwRound(lx + xx * cHHRadius * 2), hwRound(ly + yy * cHHRadius * 2), gtSeduction, 0, xx * _0_4, yy * _0_4, 0);
                    amWatermelon: newGear:= AddGear(hwRound(lx), hwRound(ly), gtWatermelon,  0, newDx, newDy, CurWeapon^.Timer);
                   amHellishBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtHellishBomb,    0, newDx, newDy, 0);
-                       amNapalm: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0);
                         amDrill: newGear:= AddGear(hwRound(lx), hwRound(ly), gtDrill, 0, newDx, newDy, 0);
                       amBallgun: newGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun,  0, xx * _0_5, yy * _0_5, 0);
                     amJetpack: newGear:= AddGear(hwRound(lx), hwRound(ly), gtJetpack, 0, _0, _0, 0);
@@ -344,7 +345,6 @@
                                 gtResurrector, 0, _0, _0, 0);
                         newGear^.SoundChannel := LoopSound(sndResurrector);
                     end;
-                   amDrillStrike: newGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, CurWeapon^.Timer);
                    //amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
                      amStructure: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtStructure, gstWait, SignAs(_0_02, dX), _0, 3000);
                         amTardis: newGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000);
--- a/hedgewars/uVariables.pas	Sun Jul 03 02:33:17 2011 +0200
+++ b/hedgewars/uVariables.pas	Sun Jul 03 11:24:53 2011 -0400
@@ -865,8 +865,8 @@
             maxAngle: 0;
             isDamaging: true;
             SkipTurns: 0;
-            PosCount: 1;
-            PosSprite: sprWater;
+            PosCount: 2;
+            PosSprite: sprTargetBee;
             ejectX: 0; //16;
             ejectY: 0),
 
--- a/hedgewars/uWorld.pas	Sun Jul 03 02:33:17 2011 +0200
+++ b/hedgewars/uWorld.pas	Sun Jul 03 11:24:53 2011 -0400
@@ -865,11 +865,11 @@
     begin
     with PHedgehog(CurrentHedgehog)^ do
         begin
-        if (CurAmmoType = amBee) then
+        if CurAmmoType = amBee then
             DrawRotatedF(sprTargetBee, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
         else
-            DrawRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
-        end;
+            DrawRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360)
+        end
     end;
 {$WARNINGS ON}
 
@@ -1144,6 +1144,8 @@
      with CurrentHedgehog^ do
        if (Gear <> nil) and ((Gear^.State and gstHHChooseTarget) <> 0) then
          begin
+         if CurAmmoType = amNapalm then
+           DrawLine(-3000, topY-300, 7000, topY-300, 3.0, (Team^.Clan^.Color shr 16), (Team^.Clan^.Color shr 8) and $FF, Team^.Clan^.Color and $FF, $FF);
          i:= GetAmmoEntry(CurrentHedgehog^)^.Pos;
          with Ammoz[CurAmmoType] do
            if PosCount > 1 then