--- a/hedgewars/uGearsUtils.pas Wed Aug 29 20:07:17 2012 +0200
+++ b/hedgewars/uGearsUtils.pas Wed Aug 29 23:12:47 2012 -0400
@@ -142,7 +142,7 @@
// Run the calcs only once we know we have a type that will need damage
tdX:= Gear^.X-fX;
tdY:= Gear^.Y-fY;
- if hwRound(hwAbs(tdX)+hwAbs(tdY)) < dmgBase then
+ if (tdX.Round + tdY.Round + 2) < dmgBase then
dmg:= dmgBase - hwRound(Distance(tdX, tdY));
if dmg > 1 then
begin
@@ -241,9 +241,7 @@
end;
end
else if Gear^.Kind <> gtStructure then // not gtHedgehog nor gtStructure
- begin
Gear^.Hedgehog:= AttackerHog;
- end;
inc(Gear^.Damage, Damage);
ScriptCall('onGearDamage', Gear^.UID, Damage);