hedgewars/uGears.pas
changeset 5139 090a8b8d1083
parent 5137 b6140f35735f
child 5179 8d64dcb566ea
equal deleted inserted replaced
5138:f991f87969ff 5139:090a8b8d1083
  1240                 gtFlame,
  1240                 gtFlame,
  1241                 gtExplosives,
  1241                 gtExplosives,
  1242                 gtStructure: begin
  1242                 gtStructure: begin
  1243 // Run the calcs only once we know we have a type that will need damage
  1243 // Run the calcs only once we know we have a type that will need damage
  1244                         if hwRound(hwAbs(Gear^.X-fX)+hwAbs(Gear^.Y-fY)) < dmgBase then
  1244                         if hwRound(hwAbs(Gear^.X-fX)+hwAbs(Gear^.Y-fY)) < dmgBase then
  1245                             dmg:= dmgBase - hwRound(Distance(Gear^.X - fX, Gear^.Y - fY));
  1245                             dmg:= dmgBase - max(hwRound(Distance(Gear^.X - fX, Gear^.Y - fY)),Gear^.Radius);
  1246                         if dmg > 1 then
  1246                         if dmg > 1 then
  1247                             begin
  1247                             begin
  1248                             dmg:= ModifyDamage(min(dmg div 2, Radius), Gear);
  1248                             dmg:= ModifyDamage(min(dmg div 2, Radius), Gear);
  1249                             //AddFileLog('Damage: ' + inttostr(dmg));
  1249                             //AddFileLog('Damage: ' + inttostr(dmg));
  1250                             if (Mask and EXPLNoDamage) = 0 then
  1250                             if (Mask and EXPLNoDamage) = 0 then