hedgewars/uAIActions.pas
changeset 194 88652abdce9a
parent 193 56885ea29202
child 195 edae828322a0
--- a/hedgewars/uAIActions.pas	Tue Oct 10 18:03:48 2006 +0000
+++ b/hedgewars/uAIActions.pas	Wed Oct 11 19:07:38 2006 +0000
@@ -115,6 +115,7 @@
 procedure ProcessAction(var Actions: TActions; Me: PGear);
 var s: shortstring;
 begin
+repeat
 if Actions.Pos >= Actions.Count then exit;
 with Actions.actions[Actions.Pos] do
      begin
@@ -153,9 +154,6 @@
             aia_HJump: ParseCommand('hjump');
             aia_LJump: ParseCommand('ljump');
              aia_Skip: ParseCommand('skip');
-             aia_Wait: if Param > GameTicks then exit
-                          else with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do
-                                    Gear.State:= Gear.State and not gstHHThinking
              end else
         begin
         s:= ActionIdToStr[Action];
@@ -170,7 +168,8 @@
      end;
 inc(Actions.Pos);
 if Actions.Pos <= Actions.Count then
-   inc(Actions.actions[Actions.Pos].Time, GameTicks)
+   inc(Actions.actions[Actions.Pos].Time, GameTicks);
+until false
 end;
 
 end.