Fix for issue #291 - this check should probably be in ApplyDamage though
authornemo
Tue, 15 Nov 2011 00:43:19 -0500
changeset 6385 e6d30db1e3b0
parent 6384 8b7e8ff1b16a
child 6386 7d7703b26bda
Fix for issue #291 - this check should probably be in ApplyDamage though
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Nov 14 22:41:08 2011 -0500
+++ b/hedgewars/GSHandlers.inc	Tue Nov 15 00:43:19 2011 -0500
@@ -4816,7 +4816,7 @@
         if (tmp^.Kind = gtHedgehog) or (tmp^.Kind = gtMine) or (tmp^.Kind = gtExplosives) then
             begin
             //tmp^.State:= tmp^.State or gstFlatened;
-            ApplyDamage(tmp, CurrentHedgehog, tmp^.Health div 3, dsUnknown);
+            if not tmp^.Invulnerable then ApplyDamage(tmp, CurrentHedgehog, tmp^.Health div 3, dsUnknown);
             //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^.IntersectGear:= tmp;