# HG changeset patch # User Xeli # Date 1313597365 -7200 # Node ID bc37bad14800b97cb2be1d569cc07d1c699b2ac1 # Parent c6c94a9a8a825cd7a133d80dd393a59e55ba92a6# Parent efd92458c75c4cc61ebc408413208a715f074125 merge diff -r c6c94a9a8a82 -r bc37bad14800 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Aug 17 17:15:42 2011 +0200 +++ b/hedgewars/uGears.pas Wed Aug 17 18:09:25 2011 +0200 @@ -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);