hedgewars/uTeams.pas
changeset 9468 3d07fd84c39d
parent 9466 8b48c27201af
child 9521 8054d9d775fd
child 9655 e154ccca4dad
equal deleted inserted replaced
9466:8b48c27201af 9468:3d07fd84c39d
    41 procedure TeamGoneEffect(var Team: TTeam);
    41 procedure TeamGoneEffect(var Team: TTeam);
    42 procedure SwitchCurrentHedgehog(newHog: PHedgehog);
    42 procedure SwitchCurrentHedgehog(newHog: PHedgehog);
    43 
    43 
    44 implementation
    44 implementation
    45 uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug,
    45 uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug,
    46     uGearsUtils, uGearsList, uVisualGearsList
    46     uGearsUtils, uGearsList, uVisualGearsList, uTextures
    47     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    47     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    48 
    48 
    49 var MaxTeamHealth: LongInt;
    49 var MaxTeamHealth: LongInt;
    50     GameOver: boolean;
    50     GameOver: boolean;
    51     NextClan: boolean;
    51     NextClan: boolean;
   712 if TeamsCount > 0 then
   712 if TeamsCount > 0 then
   713     begin
   713     begin
   714     for i:= 0 to Pred(TeamsCount) do
   714     for i:= 0 to Pred(TeamsCount) do
   715         begin
   715         begin
   716         for h:= 0 to cMaxHHIndex do
   716         for h:= 0 to cMaxHHIndex do
   717             if TeamsArray[i]^.Hedgehogs[h].GearHidden <> nil then
   717             with TeamsArray[i]^.Hedgehogs[h] do
   718                 Dispose(TeamsArray[i]^.Hedgehogs[h].GearHidden);
   718                 begin
       
   719                 if GearHidden <> nil then
       
   720                     Dispose(GearHidden);
       
   721                     
       
   722                 FreeTexture(NameTagTex);
       
   723                 FreeTexture(HealthTagTex);
       
   724                 FreeTexture(HatTex);
       
   725                 end;
       
   726                 
       
   727         with TeamsArray[i]^ do
       
   728             begin
       
   729             FreeTexture(NameTagTex);
       
   730             FreeTexture(CrosshairTex);
       
   731             FreeTexture(GraveTex);
       
   732             FreeTexture(HealthTex);
       
   733             FreeTexture(AIKillsTex);
       
   734             FreeTexture(FlagTex);
       
   735             end;
       
   736         
   719         Dispose(TeamsArray[i]);
   737         Dispose(TeamsArray[i]);
   720     end;
   738     end;
   721 for i:= 0 to Pred(ClansCount) do
   739 for i:= 0 to Pred(ClansCount) do
   722     Dispose(ClansArray[i]);
   740     Dispose(ClansArray[i]);
   723     end;
   741     end;