hedgewars/uTeams.pas
changeset 2856 cc70797a0b75
parent 2855 7e6adeb57427
child 2874 3c7c2bf1ba38
--- a/hedgewars/uTeams.pas	Wed Feb 24 01:55:59 2010 +0000
+++ b/hedgewars/uTeams.pas	Wed Feb 24 03:03:43 2010 +0000
@@ -98,8 +98,8 @@
     TeamsCount: Longword;
     ClansArray: array[0..Pred(cMaxTeams)] of PClan;
     ClansCount: Longword;
-    LocalClan: Longword;  // last non-bot, non-extdriven clan
-    LocalAmmo: Longword;  // last non-bot, non-extdriven clan's first team's ammo index
+    LocalClan: LongInt;  // last non-bot, non-extdriven clan
+    LocalAmmo: LongInt;  // last non-bot, non-extdriven clan's first team's ammo index
     CurMinAngle, CurMaxAngle: Longword;
 
 procedure init_uTeams;
@@ -349,7 +349,7 @@
       begin
       if (not ExtDriven) and (Hedgehogs[0].BotLevel = 0) then
           begin
-          LocalClan:= Clan^.ClanIndex + 1;
+          LocalClan:= Clan^.ClanIndex;
           LocalAmmo:= Hedgehogs[0].AmmoStore
           end;
       th:= 0;
@@ -467,7 +467,8 @@
 	CurrentHedgehog:= nil;
 	TeamsCount:= 0;
 	ClansCount:= 0;
-	LocalClan:= 0;  // first non-bot, non-extdriven clan
+	LocalClan:= -1;
+	LocalAmmo:= -1;
 end;
 
 procedure free_uTeams;