hedgewars/uAI.pas
changeset 6982 8d41d22a291d
parent 6770 7d2c6cdb816a
child 6992 b8f3d8991e92
equal deleted inserted replaced
6981:045e8162c9cd 6982:8d41d22a291d
   406 {$ENDIF}
   406 {$ENDIF}
   407 AddFileLog('Thread started');
   407 AddFileLog('Thread started');
   408 end;
   408 end;
   409 
   409 
   410 procedure ProcessBot;
   410 procedure ProcessBot;
   411 const StartTicks: Longword = 0;
   411 const cStopThinkTime = 40;
   412       cStopThinkTime = 40;
       
   413 begin
   412 begin
   414 with CurrentHedgehog^ do
   413 with CurrentHedgehog^ do
   415     if (Gear <> nil)
   414     if (Gear <> nil)
   416     and ((Gear^.State and gstHHDriven) <> 0)
   415     and ((Gear^.State and gstHHDriven) <> 0)
   417     and (TurnTimeLeft < cHedgehogTurnTime - 50) then
   416     and (TurnTimeLeft < cHedgehogTurnTime - 50) then
   437 end;
   436 end;
   438 
   437 
   439 procedure initModule;
   438 procedure initModule;
   440 begin
   439 begin
   441     hasThread:= 0;
   440     hasThread:= 0;
       
   441     StartTicks:= 0;
   442     ThinkThread:= ThinkThread;
   442     ThinkThread:= ThinkThread;
   443 end;
   443 end;
   444 
   444 
   445 procedure freeModule;
   445 procedure freeModule;
   446 begin
   446 begin