hedgewars/uGears.pas
changeset 3004 e9b3613cc3fb
parent 2994 7ae3067546f2
child 3028 d17cf923d7c3
equal deleted inserted replaced
3003:0afdba08a858 3004:e9b3613cc3fb
  1571                   else
  1571                   else
  1572                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,0,DxDy2Angle(Gear^.dY, Gear^.dX));
  1572                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy,0,DxDy2Angle(Gear^.dY, Gear^.dX));
  1573                   if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then
  1573                   if ((TrainingFlags and tfRCPlane) <> 0) and (TrainingTargetGear <> nil) and ((Gear^.State and gstDrowning) = 0) then
  1574                      DrawRotatedf(sprFinger, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y));
  1574                      DrawRotatedf(sprFinger, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, GameTicks div 32 mod 16, 0, DxDy2Angle(Gear^.X - TrainingTargetGear^.X, TrainingTargetGear^.Y - Gear^.Y));
  1575                   end;
  1575                   end;
  1576        gtBall: DrawRotatedf(sprBalls, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tag,0, DxDy2Angle(Gear^.dY, Gear^.dX));
  1576        gtBall: DrawRotatedf(sprBalls, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tag,0, Gear^.DirAngle);
  1577 
  1577 
  1578        gtDrill: DrawRotated(sprDrill, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
  1578        gtDrill: DrawRotated(sprDrill, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
  1579 
  1579 
  1580         gtHedgehog: DrawHH(Gear);
  1580         gtHedgehog: DrawHH(Gear);
  1581 
  1581 
  1734 var Gear: PGear;
  1734 var Gear: PGear;
  1735     dmg, dmgRadius: LongInt;
  1735     dmg, dmgRadius: LongInt;
  1736 begin
  1736 begin
  1737 TargetPoint.X:= NoPointX;
  1737 TargetPoint.X:= NoPointX;
  1738 {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF}
  1738 {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF}
  1739 if (Radius > 10) then AddGear(X, Y, gtExplosion, 0, _0, _0, 0);
  1739 if (Radius > 10) and ((Mask and EXPLNoGfx) = 0) then AddGear(X, Y, gtExplosion, 0, _0, _0, 0);
  1740 if (Mask and EXPLAutoSound) <> 0 then PlaySound(sndExplosion);
  1740 if (Mask and EXPLAutoSound) <> 0 then PlaySound(sndExplosion);
  1741 
  1741 
  1742 if (Mask and EXPLAllDamageInRadius) = 0 then
  1742 if (Mask and EXPLAllDamageInRadius) = 0 then
  1743     dmgRadius:= Radius shl 1
  1743     dmgRadius:= Radius shl 1
  1744 else
  1744 else