equal
deleted
inserted
replaced
4 |
4 |
5 procedure ProcessBot; |
5 procedure ProcessBot; |
6 procedure initModule; |
6 procedure initModule; |
7 |
7 |
8 implementation |
8 implementation |
9 uses uLandUtils, uFloat, uVariables, uTypes; |
9 uses uLandUtils, uFloat, uVariables, uTypes, uAmmos; |
10 |
10 |
11 {$linklib hwengine_future} |
11 {$linklib hwengine_future} |
12 |
12 |
13 type TAmmoCounts = array[TAmmoType] of Longword; |
13 type TAmmoCounts = array[TAmmoType] of Longword; |
14 PAmmoCounts = ^TAmmoCounts; |
14 PAmmoCounts = ^TAmmoCounts; |
41 if (Gear <> nil) and (Effects[heFrozen] = 0) then |
41 if (Gear <> nil) and (Effects[heFrozen] = 0) then |
42 begin |
42 begin |
43 for itAmmo:= Low(TAmmoType) to High(TAmmoType) do |
43 for itAmmo:= Low(TAmmoType) to High(TAmmoType) do |
44 ammoCounts[itAmmo]:= HHHasAmmo(CurrentTeam^.Hedgehogs[itHedgehog], itAmmo); |
44 ammoCounts[itAmmo]:= HHHasAmmo(CurrentTeam^.Hedgehogs[itHedgehog], itAmmo); |
45 |
45 |
46 ai_add_team_hedgehog(ai, hwFloat2float(Gear^.X), hwFloat2float(Gear^.Y), ammoCounts) |
46 ai_add_team_hedgehog(ai, hwFloat2float(Gear^.X), hwFloat2float(Gear^.Y), @ammoCounts) |
47 end; |
47 end; |
48 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber; |
48 itHedgehog:= Succ(itHedgehog) mod CurrentTeam^.HedgehogsNumber; |
49 until (itHedgehog = currHedgehogIndex); |
49 until (itHedgehog = currHedgehogIndex); |
50 |
50 |
51 ai_think(ai); |
51 ai_think(ai); |