--- a/hedgewars/uTeams.pas Sun Jan 24 19:52:30 2010 +0000
+++ b/hedgewars/uTeams.pas Tue Jan 26 04:13:37 2010 +0000
@@ -114,8 +114,6 @@
uses uMisc, uWorld, uAI, uLocale, uConsole, uAmmos, uChat;
const MaxTeamHealth: LongInt = 0;
-procedure FreeTeamsList; forward;
-
function CheckForWin: boolean;
var AliveClan: PClan;
s: shortstring;
@@ -292,13 +290,6 @@
AddTeam:= team;
end;
-procedure FreeTeamsList;
-var t: LongInt;
-begin
-for t:= 0 to Pred(TeamsCount) do Dispose(TeamsArray[t]);
-TeamsCount:= 0
-end;
-
procedure RecountAllTeamsHealth;
var t: LongInt;
begin
@@ -415,8 +406,12 @@
end;
procedure free_uTeams;
+var i: LongWord;
begin
- FreeTeamsList()
+ for i:= 0 to Pred(TeamsCount) do Dispose(TeamsArray[i]);
+ for i:= 0 to Pred(ClansCount) do Dispose(ClansArray[i]);
+ TeamsCount:= 0;
+ ClansCount:= 0
end;
end.