hedgewars/uGears.pas
changeset 815 82ff416301bd
parent 814 7fb4417b7bc1
child 821 e6c0408b54ed
--- a/hedgewars/uGears.pas	Fri Mar 14 19:34:05 2008 +0000
+++ b/hedgewars/uGears.pas	Fri Mar 14 21:07:31 2008 +0000
@@ -377,7 +377,8 @@
 
 procedure ProcessGears;
 const delay: LongWord = 0;
-      step: (stDelay, stChDmg, stChWin, stTurnReact, stSpawn, stNTurn) = stDelay;
+      step: (stDelay, stChDmg, stChWin, stTurnReact,
+             stAfterDelay, stSpawn, stNTurn) = stDelay;
 var Gear, t: PGear;
 begin
 AllInactive:= true;
@@ -403,9 +404,18 @@
         stChDmg: if CheckNoDamage then inc(step) else step:= stDelay;
         stChWin: if not CheckForWin then inc(step) else step:= stDelay;
     stTurnReact: begin
-                 TurnReaction;
+                 if not isInMultiShoot then uStats.TurnReaction;
                  inc(step)
                  end;
+   stAfterDelay: begin
+                 if delay = 0 then
+                    delay:= cInactDelay
+                 else
+                    dec(delay);
+
+                 if delay = 0 then
+                    inc(step)
+                 end;
         stSpawn: begin
                  if not isInMultiShoot then SpawnBoxOfSmth;
                  inc(step)