hedgewars/uGearsRender.pas
changeset 15038 01bb1d7ca14f
parent 15036 7328f16bd299
child 15040 0dbd06bf90f4
--- a/hedgewars/uGearsRender.pas	Fri May 24 12:31:30 2019 +0200
+++ b/hedgewars/uGearsRender.pas	Fri May 24 14:55:48 2019 +0200
@@ -1300,11 +1300,16 @@
                      end;
                  end;
 
-           gtDrill: if (Gear^.State and gsttmpFlag) <> 0 then
-                        DrawSpriteRotated(sprAirDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX))
+           gtDrill: begin
+                    if (Gear^.Pos = 1) then
+                        i:= (RealTicks shr 5 + Gear^.uid) mod 4
                     else
-                        DrawSpriteRotated(sprDrill, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
-
+                        i:= Gear^.uid mod 4;
+                    if (Gear^.State and gsttmpFlag) <> 0 then
+                        DrawTextureRotatedF(SpritesData[sprAirDrill].texture, 0.5, 0, 0, x, y, i, 0, 64, 64, DxDy2Angle(Gear^.dY, Gear^.dX))
+                    else
+                        DrawTextureRotatedF(SpritesData[sprDrill].texture, 0.5, 0, 0, x, y, i, 0, 64, 64, DxDy2Angle(Gear^.dY, Gear^.dX));
+                    end;
         gtHedgehog: DrawHH(Gear, x, y);
 
            gtShell: DrawSpriteRotated(sprBazookaShell, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));