equal
deleted
inserted
replaced
39 ThinkThread: TThreadID; |
39 ThinkThread: TThreadID; |
40 hasThread: LongInt; |
40 hasThread: LongInt; |
41 |
41 |
42 procedure FreeActionsList; |
42 procedure FreeActionsList; |
43 begin |
43 begin |
44 {$IFDEF DEBUGFILE}AddFileLog('FreeActionsList called');{$ENDIF} |
44 AddFileLog('FreeActionsList called'); |
45 if hasThread <> 0 then |
45 if hasThread <> 0 then |
46 begin |
46 begin |
47 {$IFDEF DEBUGFILE}AddFileLog('Waiting AI thread to finish');{$ENDIF} |
47 AddFileLog('Waiting AI thread to finish'); |
48 StopThinking:= true; |
48 StopThinking:= true; |
49 repeat |
49 repeat |
50 SDL_Delay(10) |
50 SDL_Delay(10) |
51 until hasThread = 0 |
51 until hasThread = 0 |
52 end; |
52 end; |
321 end; |
321 end; |
322 |
322 |
323 FillBonuses((Me^.State and gstAttacked) <> 0); |
323 FillBonuses((Me^.State and gstAttacked) <> 0); |
324 for a:= Low(TAmmoType) to High(TAmmoType) do |
324 for a:= Low(TAmmoType) to High(TAmmoType) do |
325 CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(Me^.Hedgehog^, a); |
325 CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(Me^.Hedgehog^, a); |
326 {$IFDEF DEBUGFILE}AddFileLog('Enter Think Thread');{$ENDIF} |
326 AddFileLog('Enter Think Thread'); |
327 BeginThread(@Think, Me, ThinkThread) |
327 BeginThread(@Think, Me, ThinkThread) |
328 end; |
328 end; |
329 |
329 |
330 procedure ProcessBot; |
330 procedure ProcessBot; |
331 const StartTicks: Longword = 0; |
331 const StartTicks: Longword = 0; |