hedgewars/uTeams.pas
changeset 10634 35d059bd0932
parent 10581 f0b4c14a3c62
child 10635 8e8b320eefad
equal deleted inserted replaced
10633:2f062fac5791 10634:35d059bd0932
   850     for i:= 0 to Pred(TeamsCount) do
   850     for i:= 0 to Pred(TeamsCount) do
   851         begin
   851         begin
   852         for h:= 0 to cMaxHHIndex do
   852         for h:= 0 to cMaxHHIndex do
   853             with TeamsArray[i]^.Hedgehogs[h] do
   853             with TeamsArray[i]^.Hedgehogs[h] do
   854                 begin
   854                 begin
       
   855                 if Gear <> nil then
       
   856                     DeleteGear(Gear);
   855                 if GearHidden <> nil then
   857                 if GearHidden <> nil then
   856                     Dispose(GearHidden);
   858                     DeleteGear(GearHidden);
   857 
   859 
   858                 FreeTexture(NameTagTex);
   860                 FreeAndNilTexture(NameTagTex);
   859                 FreeTexture(HealthTagTex);
   861                 FreeAndNilTexture(HealthTagTex);
   860                 FreeTexture(HatTex);
   862                 FreeAndNilTexture(HatTex)
   861                 end;
   863                 end;
   862 
   864 
   863         with TeamsArray[i]^ do
   865         with TeamsArray[i]^ do
   864             begin
   866             begin
   865             FreeTexture(NameTagTex);
   867             FreeAndNilTexture(NameTagTex);
   866             FreeTexture(GraveTex);
   868             FreeAndNilTexture(OwnerTex);
   867             FreeTexture(AIKillsTex);
   869             FreeAndNilTexture(GraveTex);
   868             FreeTexture(FlagTex);
   870             FreeAndNilTexture(AIKillsTex);
       
   871             FreeAndNilTexture(FlagTex);
   869             end;
   872             end;
   870 
   873 
   871         Dispose(TeamsArray[i]);
   874         Dispose(TeamsArray[i])
   872     end;
   875         end;
   873     for i:= 0 to Pred(ClansCount) do
   876     for i:= 0 to Pred(ClansCount) do
   874         begin
   877         begin
   875         FreeTexture(ClansArray[i]^.HealthTex);
   878         FreeAndNilTexture(ClansArray[i]^.HealthTex);
   876         Dispose(ClansArray[i]);
   879         Dispose(ClansArray[i])
   877         end
   880         end
   878     end;
   881     end;
   879 TeamsCount:= 0;
   882 TeamsCount:= 0;
   880 ClansCount:= 0;
   883 ClansCount:= 0;
   881 end;
   884 end;