Check if hedgehog is still active instead
authorunc0rr
Wed, 15 Aug 2012 16:25:24 +0400
changeset 7539 c6ffbc6530e3
parent 7537 833a0c34fafc
child 7541 e51b11349637
Check if hedgehog is still active instead
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Aug 13 23:17:09 2012 +0400
+++ b/hedgewars/GSHandlers.inc	Wed Aug 15 16:25:24 2012 +0400
@@ -1816,7 +1816,7 @@
                 Message := Message and (not gmAttack)
                 end;
         DeleteGear(Gear);
-	exit;
+        exit;
         end;
     if CheckGearDrowning(HHGear) then DeleteGear(Gear)
 end;
@@ -4783,7 +4783,7 @@
         Gear^.Timer:= Gear^.Tag
         end;
 
-    if (Gear^.Health = 0) or (HHGear^.Damage <> 0) then
+    if (Gear^.Health = 0) or ((HHGear^.State and gstHHDriven) = 0) then
         begin
         DeleteGear(Gear);
         AfterAttack
@@ -4859,7 +4859,7 @@
         Gear^.Timer:= Gear^.Tag
         end;
 
-    if (Gear^.Health = 0) or (HHGear^.Damage <> 0) or ((HHGear^.Message and gmAttack) <> 0) then
+    if (Gear^.Health = 0) or ((HHGear^.State and gstHHDriven) = 0) or ((HHGear^.Message and gmAttack) <> 0) then
         begin
         HHGear^.Message:= HHGear^.Message and (not gmAttack);
         DeleteGear(Gear);