hedgewars/uTeams.pas
changeset 2855 7e6adeb57427
parent 2826 fbcfc86ef477
child 2856 cc70797a0b75
--- a/hedgewars/uTeams.pas	Tue Feb 23 23:54:38 2010 +0000
+++ b/hedgewars/uTeams.pas	Wed Feb 24 01:55:59 2010 +0000
@@ -98,7 +98,8 @@
     TeamsCount: Longword;
     ClansArray: array[0..Pred(cMaxTeams)] of PClan;
     ClansCount: Longword;
-    LocalClan: Longword;  // first non-bot, non-extdriven clan
+    LocalClan: Longword;  // last non-bot, non-extdriven clan
+    LocalAmmo: Longword;  // last non-bot, non-extdriven clan's first team's ammo index
     CurMinAngle, CurMaxAngle: Longword;
 
 procedure init_uTeams;
@@ -347,7 +348,10 @@
    with TeamsArray[t]^ do
       begin
       if (not ExtDriven) and (Hedgehogs[0].BotLevel = 0) then
+          begin
           LocalClan:= Clan^.ClanIndex + 1;
+          LocalAmmo:= Hedgehogs[0].AmmoStore
+          end;
       th:= 0;
       for i:= 0 to cMaxHHIndex do
           if Hedgehogs[i].Gear <> nil then