hedgewars/GSHandlers.inc
changeset 302 7aca131ecd7f
parent 300 be94799f33d2
child 303 1659c4aad5ab
--- a/hedgewars/GSHandlers.inc	Fri Dec 15 12:48:40 2006 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Dec 17 17:55:41 2006 +0000
@@ -424,6 +424,32 @@
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
+
+procedure doStepBlowTorch(Gear: PGear);
+var HHGear: PGear;
+begin
+AllInactive:= false;
+dec(Gear.Timer);
+HHGear:= PHedgehog(Gear.Hedgehog).Gear;
+if Gear.Timer mod cHHStepTicks = 0 then
+   begin
+   DrawTunnel(HHGear.X, HHGear.Y - 1, Gear.dX, 0, cHHRadius * 2, cHHRadius * 2);
+   HHGear.State:= HHGear.State and not gstAttacking;
+   if Gear.dX < 0 then HHGear.Message:= gm_Left
+                  else HHGear.Message:= gm_Right;
+   HedgehogStep(HHGear);
+   if (HHGear.State and gstFalling) <> 0 then Gear.Timer:= 0
+   end;
+if Gear.Timer = 0 then
+   begin
+   HHGear.Message:= 0;
+   DeleteGear(Gear);
+   AfterAttack
+   end
+end;
+
+////////////////////////////////////////////////////////////////////////////////
+
 procedure doStepRopeWork(Gear: PGear);
 const flCheck: boolean = false;
 var HHGear: PGear;