--- a/hedgewars/uWorld.pas Sun Oct 28 04:31:16 2012 +0100
+++ b/hedgewars/uWorld.pas Sun Oct 28 04:31:27 2012 +0100
@@ -1160,28 +1160,6 @@
DrawWater(255, 0);
-// Attack bar
- if CurrentTeam <> nil then
- case AttackBar of
-(* 1: begin
- r:= StuffPoz[sPowerBar];
- {$WARNINGS OFF}
- r.w:= (CurrentHedgehog^.Gear^.Power * 256) div cPowerDivisor;
- {$WARNINGS ON}
- DrawSpriteFromRect(r, cScreenWidth - 272, cScreenHeight - 48, 16, 0, Surface);
- end;*)
- 2: with CurrentHedgehog^ do
- begin
- tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle);
- tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle);
- for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do
- DrawSprite(sprPower,
- hwRound(Gear^.X) + GetLaunchX(CurAmmoType, hwSign(Gear^.dX), Gear^.Angle) + LongInt(round(WorldDx + tdx * (24 + i * 2))) - 16,
- hwRound(Gear^.Y) + GetLaunchY(CurAmmoType, Gear^.Angle) + LongInt(round(WorldDy + tdy * (24 + i * 2))) - 16,
- i)
- end
- end;
-
DrawVisualGears(1);
DrawGears;
DrawVisualGears(6);
@@ -1385,6 +1363,29 @@
Tint($FF,$FF,$FF,$FF);
end;
+// Attack bar
+ if CurrentTeam <> nil then
+ case AttackBar of
+(* 1: begin
+ r:= StuffPoz[sPowerBar];
+ {$WARNINGS OFF}
+ r.w:= (CurrentHedgehog^.Gear^.Power * 256) div cPowerDivisor;
+ {$WARNINGS ON}
+ DrawSpriteFromRect(r, cScreenWidth - 272, cScreenHeight - 48, 16, 0, Surface);
+ end;*)
+ 2: with CurrentHedgehog^ do
+ begin
+ tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle);
+ tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle);
+ for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do
+ DrawSprite(sprPower,
+ hwRound(Gear^.X) + GetLaunchX(CurAmmoType, hwSign(Gear^.dX), Gear^.Angle) + LongInt(round(WorldDx + tdx * (24 + i * 2))) - 16,
+ hwRound(Gear^.Y) + GetLaunchY(CurAmmoType, Gear^.Angle) + LongInt(round(WorldDy + tdy * (24 + i * 2))) - 16,
+ i)
+ end
+ end;
+
+
// Lag alert
if isInLag then
DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12);