fix the fix
authorsheepluva
Sun, 09 Aug 2015 04:02:23 +0200
changeset 11042 d29a05a55bbc
parent 11041 598fa14a3a1a
child 11043 79a77bef4c61
fix the fix
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);