hedgewars/uGears.pas
changeset 1141 44d4d6aaecb5
parent 1113 d63a3567a6fe
child 1200 b92323ccce45
equal deleted inserted replaced
1140:a32f1eed51a6 1141:44d4d6aaecb5
  1077 if (Mask and EXPLAllDamageInRadius)=0 then dmgRadius:= Radius shl 1
  1077 if (Mask and EXPLAllDamageInRadius)=0 then dmgRadius:= Radius shl 1
  1078                                       else dmgRadius:= Radius;
  1078                                       else dmgRadius:= Radius;
  1079 Gear:= GearsList;
  1079 Gear:= GearsList;
  1080 while Gear <> nil do
  1080 while Gear <> nil do
  1081       begin
  1081       begin
  1082       dmg:= dmgRadius - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));
  1082       dmg:= dmgRadius  + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));
  1083       if (dmg > 1) and
  1083       if (dmg > 1) and
  1084          ((Gear^.State and gstNoDamage) = 0) then
  1084          ((Gear^.State and gstNoDamage) = 0) then
  1085          begin
  1085          begin
  1086          dmg:= dmg div 2;
  1086          dmg:= min(dmg div 2, Radius);
  1087          case Gear^.Kind of
  1087          case Gear^.Kind of
  1088               gtHedgehog,
  1088               gtHedgehog,
  1089                   gtMine,
  1089                   gtMine,
  1090                   gtCase,
  1090                   gtCase,
  1091                 gtTarget,
  1091                 gtTarget,