hedgewars/uAmmos.pas
changeset 547 b81a055f2d06
parent 545 f527450337c1
child 553 5478386d935f
--- a/hedgewars/uAmmos.pas	Mon Jul 02 18:35:31 2007 +0000
+++ b/hedgewars/uAmmos.pas	Mon Jul 02 21:33:21 2007 +0000
@@ -79,16 +79,15 @@
 end;
 
 procedure AssignStores;
-var tteam: PTeam;
+var t: LongInt;
     i: Longword;
 begin
-tteam:= TeamsList;
-while tteam <> nil do
+for t:= 0 to Pred(TeamsCount) do
+   with TeamsArray[t]^ do
       begin
       for i:= 0 to cMaxHHIndex do
-          if tteam^.Hedgehogs[i].Gear <> nil then
-             tteam^.Hedgehogs[i].Ammo:= GetAmmoByNum(tteam^.Hedgehogs[i].AmmoStore);
-      tteam:= tteam^.Next
+          if Hedgehogs[i].Gear <> nil then
+             Hedgehogs[i].Ammo:= GetAmmoByNum(Hedgehogs[i].AmmoStore);
       end
 end;