hedgewars/uGearsHandlersMess.pas
changeset 12124 3374e0f67f39
parent 12099 4dfc95eabee1
child 12125 1aae30470fa3
--- a/hedgewars/uGearsHandlersMess.pas	Sun Jan 15 12:49:26 2017 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Jan 15 12:50:27 2017 -0500
@@ -2301,15 +2301,25 @@
 var
     HHGear: PGear;
 begin
-    HHGear := Gear^.Hedgehog^.Gear;
-    HHGear^.State := HHGear^.State or gstNoDamage;
-    DeleteCI(HHGear);
-
-    AmmoShove(Gear, Gear^.Boom, 115);
-
-    HHGear^.State := (HHGear^.State and (not gstNoDamage)) or gstMoving;
-    Gear^.Timer := 250;
-    Gear^.doStep := @doStepIdle
+    dec(Gear^.Timer);
+    if Gear^.Timer = 0 then
+        begin
+        inc(Gear^.Tag);
+        Gear^.Timer := 100
+        end;
+
+    if Gear^.Tag = 5 then
+        begin
+        HHGear := Gear^.Hedgehog^.Gear;
+        HHGear^.State := HHGear^.State or gstNoDamage;
+        DeleteCI(HHGear);
+
+        AmmoShove(Gear, Gear^.Boom, 115);
+
+        HHGear^.State := (HHGear^.State and (not gstNoDamage)) or gstMoving;
+        Gear^.Timer := 250;
+        Gear^.doStep := @doStepIdle
+        end
 end;
 
 ////////////////////////////////////////////////////////////////////////////////