equal
deleted
inserted
replaced
127 type TStackEntry = record |
127 type TStackEntry = record |
128 WastedTicks: Longword; |
128 WastedTicks: Longword; |
129 MadeActions: TActions; |
129 MadeActions: TActions; |
130 Hedgehog: TGear; |
130 Hedgehog: TGear; |
131 end; |
131 end; |
132 |
132 |
133 var Stack: record |
133 var Stack: record |
134 Count: Longword; |
134 Count: Longword; |
135 States: array[0..Pred(cBranchStackSize)] of TStackEntry; |
135 States: array[0..Pred(cBranchStackSize)] of TStackEntry; |
136 end; |
136 end; |
137 |
137 |
308 if Targets.Count = 0 then |
308 if Targets.Count = 0 then |
309 begin |
309 begin |
310 OutError('AI: no targets!?', false); |
310 OutError('AI: no targets!?', false); |
311 exit |
311 exit |
312 end; |
312 end; |
|
313 |
313 FillBonuses((Me^.State and gstAttacked) <> 0); |
314 FillBonuses((Me^.State and gstAttacked) <> 0); |
314 for a:= Low(TAmmoType) to High(TAmmoType) do |
315 for a:= Low(TAmmoType) to High(TAmmoType) do |
315 CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(PHedgehog(Me^.Hedgehog)^, a); |
316 CanUseAmmo[a]:= Assigned(AmmoTests[a].proc) and HHHasAmmo(PHedgehog(Me^.Hedgehog)^, a); |
316 {$IFDEF DEBUGFILE}AddFileLog('Enter Think Thread');{$ENDIF} |
317 {$IFDEF DEBUGFILE}AddFileLog('Enter Think Thread');{$ENDIF} |
317 BeginThread(@Think, Me, ThinkThread) |
318 BeginThread(@Think, Me, ThinkThread) |