hedgewars/uGears.pas
changeset 3461 0781275649e9
parent 3460 d957d5f7b58d
child 3470 2b0c88693535
--- a/hedgewars/uGears.pas	Fri May 14 16:02:27 2010 +0000
+++ b/hedgewars/uGears.pas	Fri May 14 23:42:56 2010 +0000
@@ -181,8 +181,7 @@
             @doStepPortalShot,
             @doStepPiano,
             @doStepBomb,
-            @doStepSineGunShot,
-            @doStepHealthTag
+            @doStepSineGunShot
             );
 
 procedure InsertGearToList(Gear: PGear);
@@ -298,10 +297,6 @@
 gtAmmo_Grenade: begin // bazooka
                 gear^.Radius:= 4;
                 end;
-   gtHealthTag: begin
-                gear^.Timer:= 1500;
-                gear^.Z:= 2002;
-                end;
        gtGrave: begin
                 gear^.ImpactSound:= sndGraveImpact;
                 gear^.nImpactSounds:= 1;
@@ -530,7 +525,7 @@
             t:= max(Gear^.Damage, Gear^.Health);
             Gear^.Damage:= t;
             if (cWaterOpacity < $FF) and (hwRound(Gear^.Y) < cWaterLine + 256) then
-                AddGear(hwRound(Gear^.X), min(hwRound(Gear^.Y),cWaterLine+cVisibleWater+32), gtHealthTag, t, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; //spawnHealthTagForHH(Gear, t);
+                spawnHealthTagForHH(Gear, t);
             uStats.HedgehogDamaged(Gear)
             end;
 
@@ -594,8 +589,7 @@
                 not SuddenDeathDmg then
                 Gear^.State:= Gear^.State or gstLoser;
 
-            AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) - cHHRadius - 12,
-                    gtHealthTag, dmg, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; // spawnHealthTagForHH(Gear, dmg);
+            spawnHealthTagForHH(Gear, dmg);
 
             RenderHealth(PHedgehog(Gear^.Hedgehog)^);
             RecountTeamHealth(PHedgehog(Gear^.Hedgehog)^.Team);
@@ -915,10 +909,7 @@
            not CurrentHedgehog^.Gear^.Invulnerable then
            begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid
            inc(CurrentHedgehog^.Gear^.Karma, tmpDmg);
-           
-           AddGear(hwRound(CurrentHedgehog^.Gear^.X),
-                   hwRound(CurrentHedgehog^.Gear^.Y),
-                   gtHealthTag, tmpDmg, _0, _0, 0)^.Hedgehog:= CurrentHedgehog; // spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg);
+           spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg);
            end;
         end;
     end;