hedgewars/uAI.pas
changeset 95 1ef5e2c41115
parent 83 207c85fbef51
child 111 30ca06092a64
equal deleted inserted replaced
94:c6eec0bdb630 95:1ef5e2c41115
   282 procedure ProcessBot;
   282 procedure ProcessBot;
   283 begin
   283 begin
   284 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do
   284 with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do
   285      if (Gear <> nil)
   285      if (Gear <> nil)
   286         and ((Gear.State and gstHHDriven) <> 0)
   286         and ((Gear.State and gstHHDriven) <> 0)
   287         and (TurnTimeLeft < 29990)
   287         and (TurnTimeLeft < cHedgehogTurnTime - 5)
   288         and ((Gear.State and gstHHThinking) = 0) then
   288         and ((Gear.State and gstHHThinking) = 0) then
   289            if (BestActions.Pos >= BestActions.Count) then StartThink(Gear)
   289            if (BestActions.Pos >= BestActions.Count) then StartThink(Gear)
   290                                                      else ProcessAction(BestActions, Gear)
   290                                                      else ProcessAction(BestActions, Gear)
   291 end;
   291 end;
   292 
   292