hedgewars/GSHandlers.inc
changeset 1849 2a989e5abda6
parent 1830 b3e9ab82c364
child 1861 98de5dc5fda7
--- a/hedgewars/GSHandlers.inc	Fri Feb 27 21:40:13 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Mar 01 17:24:25 2009 +0000
@@ -40,6 +40,7 @@
 procedure CheckHHDamage(Gear: PGear);
 var dmg: Longword;
 begin
+if(Gear^.Invulnerable) then exit;
 if _0_4 < Gear^.dY then
 	begin
 	if _0_6 < Gear^.dY then
@@ -1704,7 +1705,7 @@
 	while gi <> nil do
 		begin
 		dmg:= cakeDmg * 2 - hwRound(Distance(gi^.X - Gear^.X, gi^.Y - Gear^.Y));
-		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
+		if (dmg > 1) and (gi^.Kind = gtHedgehog) and (not gi^.Invulnerable) then
 			gi^.State:= gi^.State or gstWinner;
 		gi:= gi^.NextGear
 		end;