# HG changeset patch # User sheepluva # Date 1439085743 -7200 # Node ID d29a05a55bbc22c74becf5431605d2c0e3c1217b # Parent 598fa14a3a1ace0db2c198f67642652cc3b48b48 fix the fix diff -r 598fa14a3a1a -r d29a05a55bbc hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Sun Aug 09 00:49:49 2015 +0200 +++ b/hedgewars/uGearsHandlersMess.pas Sun Aug 09 04:02:23 2015 +0200 @@ -5225,6 +5225,7 @@ if (tmp^.State and gstNoDamage) = 0 then if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then begin + dmg:= 0; //tmp^.State:= tmp^.State or gstFlatened; if (tmp^.Kind <> gtHedgehog) or (tmp^.Hedgehog^.Effects[heInvulnerable] = 0) then begin @@ -5245,15 +5246,16 @@ ApplyDamage(tmp, CurrentHedgehog, dmg, dsUnknown); end; + end; + + if (tmp^.Kind <> gtHedgehog) or (dmg > 0) or (tmp^.Health > tmp^.Damage) then + begin + //DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3); + tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0); + tmp2^.LinkedGear:= tmp; + SetAllToActive + end; end; - //DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3); - tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0); - tmp2^.LinkedGear:= tmp; - SetAllToActive - end - else - begin - end end; HHGear^.State:= HHGear^.State and (not gstNoDamage);