hedgewars/uTeams.pas
changeset 12919 0f02dd1ff4c9
parent 12579 0411e04cf12a
child 13018 0248cf0da834
equal deleted inserted replaced
12918:6deb29364723 12919:0f02dd1ff4c9
   189         end;
   189         end;
   190 
   190 
   191 c:= CurrentTeam^.Clan^.ClanIndex;
   191 c:= CurrentTeam^.Clan^.ClanIndex;
   192 repeat
   192 repeat
   193     with ClansArray[c]^ do
   193     with ClansArray[c]^ do
   194         if (CurrTeam = TagTeamIndex) and ((GameFlags and gfTagTeam) <> 0) then
   194         if (GameFlags and gfTagTeam) <> 0 then
   195             begin
   195             begin
   196             TagTeamIndex:= Pred(TagTeamIndex) mod TeamsNumber;
   196             if (CurrTeam = TagTeamIndex) then
   197             CurrTeam:= Pred(CurrTeam) mod TeamsNumber;
   197                 begin
   198             inc(c);
   198                 if (c = 0) and (not PlacingHogs) then
   199             NextClan:= true;
   199                     inc(TotalRounds);
   200             end;
   200                 TagTeamIndex:= Pred(TagTeamIndex) mod TeamsNumber;
       
   201                 CurrTeam:= Pred(CurrTeam) mod TeamsNumber;
       
   202                 inc(c);
       
   203                 NextClan:= true;
       
   204                 end;
       
   205             end
       
   206         else if (c = 0) and (not PlacingHogs) then
       
   207             inc(TotalRounds);
   201 
   208 
   202     if (GameFlags and gfTagTeam) = 0 then
   209     if (GameFlags and gfTagTeam) = 0 then
   203         inc(c);
   210         inc(c);
   204 
   211 
   205     if c = ClansCount then
   212     if c = ClansCount then
   206         begin
   213         c:= 0;
   207         if not PlacingHogs then
       
   208             inc(TotalRounds);
       
   209         c:= 0
       
   210         end;
       
   211 
   214 
   212     with ClansArray[c]^ do
   215     with ClansArray[c]^ do
   213         begin
   216         begin
   214         PrevTeam:= CurrTeam;
   217         PrevTeam:= CurrTeam;
   215         repeat
   218         repeat