hedgewars/uWorld.pas
changeset 3580 85bd667955f2
parent 3551 d4de36b3801a
child 3582 4debed8656d7
equal deleted inserted replaced
3578:00aac66147c8 3580:85bd667955f2
   610                 begin
   610                 begin
   611                 tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle);
   611                 tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle);
   612                 tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle);
   612                 tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle);
   613                 for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do
   613                 for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do
   614                     DrawSprite(sprPower,
   614                     DrawSprite(sprPower,
   615                             hwRound(Gear^.X) + round(WorldDx + tdx * (24 + i * 2)) - 16,
   615                             hwRound(Gear^.X) + GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Gear^.dX), Gear^.Angle) + round(WorldDx + tdx * (24 + i * 2)) - 16,
   616                             hwRound(Gear^.Y) + round(WorldDy + tdy * (24 + i * 2)) - 12,
   616                             hwRound(Gear^.Y) + GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Gear^.Angle) + round(WorldDy + tdy * (24 + i * 2)) - 16,
   617                             i)
   617                             i)
   618                 end
   618                 end
   619         end;
   619         end;
   620 
   620 
   621 DrawVisualGears(1);
   621 DrawVisualGears(1);