hedgewars/uGears.pas
changeset 777 86177328b094
parent 776 8fc7e59d9cb4
child 783 4f59db6f147d
--- a/hedgewars/uGears.pas	Mon Jan 28 19:05:29 2008 +0000
+++ b/hedgewars/uGears.pas	Mon Jan 28 22:21:47 2008 +0000
@@ -495,10 +495,13 @@
               DrawSprite(sprQuestion, hwRound(Gear^.X) - 10 + WorldDx, hwRound(Gear^.Y) - cHHRadius - 34 + WorldDy, 0, Surface)
               else
               if ShowCrosshair and ((Gear^.State and gstAttacked) = 0) then
-                 DrawSurfSprite(Round(hwRound(Gear^.X) + hwSign(Gear^.dX) * Sin(Gear^.Angle*pi/cMaxAngle)*60) + WorldDx - 11,
-                           Round(hwRound(Gear^.Y) - Cos(Gear^.Angle*pi/cMaxAngle)*60) + WorldDy - 12,
-                           24, (18 + hwSign(Gear^.dX) * LongInt(((Gear^.Angle * 72 div cMaxAngle) + 1) div 2) mod 18) mod 18,
-                           Team^.CrosshairTex, Surface);
+                 DrawRotatedTex(Team^.CrosshairTex,
+                                12, 12,
+                                Round(hwRound(Gear^.X) +
+                                hwSign(Gear^.dX) * Sin(Gear^.Angle*pi/cMaxAngle)*60) + WorldDx,
+                                Round(hwRound(Gear^.Y) -
+                                Cos(Gear^.Angle*pi/cMaxAngle)*60) + WorldDy,
+                                hwSign(Gear^.dX) * Gear^.Angle * 180 / cMaxAngle)
         end;
 end;