hedgewars/uVisualGears.pas
changeset 5563 fc73b6e941f7
parent 5562 8056d82b4d23
child 5564 4f42009237df
--- a/hedgewars/uVisualGears.pas	Sun Aug 14 16:59:55 2011 -0400
+++ b/hedgewars/uVisualGears.pas	Sun Aug 14 17:42:26 2011 -0400
@@ -90,7 +90,6 @@
             @doStepAmmo,
             @doStepSmoke,
             @doStepSmoke,
-            @doStepHealth,
             @doStepShell,
             @doStepDust,
             @doStepSplash,
@@ -236,14 +235,6 @@
                 Frame:= 7 - random(2);
                 FrameTicks:= cExplFrameTicks * 2;
                 end;
-    vgtHealth: begin
-                dx:= 0.001 * random(45);
-                dy:= 0.001 * (random(20) + 25);
-                Tint:= $00FF00FF; // default to green
-                if random(2) = 0 then dx := -dx;
-                Frame:= 0;
-                FrameTicks:= random(750) + 1250;
-                end;
   vgtDust: begin
                 dx:= 0.005 * (random(15) + 10);
                 dy:= 0.001 * (random(40) + 20);
@@ -332,7 +323,7 @@
                 if random(2) = 0 then dy := -dy;
                 Frame:= 0;
                 FrameTicks:= random(750) + 1000;
-                Sprite:= sprSnowDust;
+                State:= ord(sprSnowDust);
                 end;
         end;
 
@@ -487,8 +478,7 @@
                              end;
             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
             vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
-            vgtHealth: DrawSprite(sprHealth, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, 0);
-            vgtStraightShot: DrawRotatedF(Gear^.Sprite, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
+            vgtStraightShot: DrawRotatedF(TSprite(Gear^.State), round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
         end;
         if (cReducedQuality and rqAntiBoom) = 0 then
             case Gear^.Kind of