hedgewars/GSHandlers.inc
changeset 3821 03b1af3a1c8f
parent 3802 2ccfc93c6b5e
child 3836 833c0f32e326
--- a/hedgewars/GSHandlers.inc	Fri Sep 03 01:26:58 2010 +0200
+++ b/hedgewars/GSHandlers.inc	Fri Sep 03 01:41:51 2010 +0200
@@ -3953,7 +3953,7 @@
     AllInactive := false;
     HHGear := PHedgehog(Gear^.Hedgehog)^.Gear;
     dec(Gear^.Timer);
-    if (Gear^.Timer = 0)or((Gear^.Message and gm_Destroy) <> 0) then
+    if (HHGear = nil) or (Gear^.Timer = 0) or ((Gear^.Message and gm_Destroy) <> 0) then
     begin
         DeleteGear(Gear);
         exit
@@ -3995,16 +3995,6 @@
     Gear^.X := Gear^.X + HHGear^.dX;
     HHGear^.X := Gear^.X;
     HHGear^.Y := Gear^.Y - int2hwFloat(cHHRadius);
-
-    if (Gear^.Message and gm_Attack) <> 0 then
-        if (Gear^.State and gsttmpFlag) <> 0 then Gear^.Timer := 1
-    else
-    else
-        if (Gear^.State and gsttmpFlag) = 0 then Gear^.State := Gear^.State or gsttmpFlag;
-    if ((Gear^.Message and gm_Left) <> 0) then Gear^.dX := - _0_3
-    else
-        if ((Gear^.Message and gm_Right) <> 0) then Gear^.dX := _0_3
-    else Gear^.dX := _0;
 end;
 
 procedure doStepHammerHit(Gear: PGear);
@@ -4030,5 +4020,5 @@
     DeleteCI(HHGear);
 
     doStepHammerHitWork(Gear);
-    Gear^.doStep := @doStepHammerHit
+    Gear^.doStep := @doStepHammerHitWork
 end;