# HG changeset patch # User nemo # Date 1313594270 14400 # Node ID efd92458c75c4cc61ebc408413208a715f074125 # Parent cf643996c1ee8670623df6111795ecc87a2c8d75 ... diff -r cf643996c1ee -r efd92458c75c hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Aug 17 11:07:03 2011 -0400 +++ b/hedgewars/uGears.pas Wed Aug 17 11:17:50 2011 -0400 @@ -1351,12 +1351,13 @@ gtExplosives, gtStructure: begin //addFileLog('ShotgunShot radius: ' + inttostr(Gear^.Radius) + ', t^.Radius = ' + inttostr(t^.Radius) + ', distance = ' + inttostr(dist) + ', dmg = ' + inttostr(dmg)); + dmg:= 0; r:= Gear^.Radius + t^.Radius; dx:= Gear^.X-t^.X; dx.isNegative:= false; dy:= Gear^.Y-t^.Y; dy.isNegative:= false; - if hwRound(dx+dy) < 25+r then + if r-hwRound(dx+dy) > 0 then begin dist:= hwRound(Distance(dx, dy)); dmg:= ModifyDamage(min(r - dist, 25), t); @@ -1377,12 +1378,13 @@ end end; gtGrave: begin + dmg:= 0; r:= Gear^.Radius + t^.Radius; dx:= Gear^.X-t^.X; dx.isNegative:= false; dy:= Gear^.Y-t^.Y; dy.isNegative:= false; - if hwRound(dx+dy) < 25+r then + if r-hwRound(dx+dy) > 0 then begin dist:= hwRound(Distance(dx, dy)); dmg:= ModifyDamage(min(r - dist, 25), t);