hedgewars/uVisualGears.pas
changeset 5748 70d7f8e40f53
parent 5690 f6e0c5bd8020
child 5800 3a04c30e5ac7
--- a/hedgewars/uVisualGears.pas	Sat Sep 03 21:35:49 2011 +0400
+++ b/hedgewars/uVisualGears.pas	Sat Sep 03 14:01:52 2011 -0400
@@ -317,10 +317,11 @@
                 dy:= 0;
                 FrameTicks:= 350;
                 Frame:= 7;
-                Angle := 0;
+                Angle:= 0;
                 end;
 vgtSmoothWindBar: Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
  vgtStraightShot: begin
+                Scale:= 1.0;
                 dx:= 0.001 * random(45);
                 dy:= 0.001 * (random(20) + 25);
                 State:= ord(sprHealth);
@@ -494,6 +495,7 @@
 var Gear: PVisualGear;
     tinted: boolean;
     tmp: real;
+    i: LongInt;
 begin
 case Layer of
     // this layer is very distant in the background when stereo
@@ -592,8 +594,10 @@
                                    SetScale(zoom)
                                    end
                                end;
-    //if Ger^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
-               vgtStraightShot: DrawRotatedF(TSprite(Gear^.State), round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
+               vgtStraightShot: begin 
+                                if Gear^.dX < 0 then i:= -1 else i:= 1;
+                                DrawTextureF(SpritesData[TSprite(Gear^.State)].Texture, Gear^.Scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, i, SpritesData[TSprite(Gear^.State)].Width, SpritesData[TSprite(Gear^.State)].Height);
+                                end;
            end;
            if (cReducedQuality and rqAntiBoom) = 0 then
                case Gear^.Kind of