Backout 0f02dd1ff4c9. This is not how TotalRounds should work
authorWuzzy <Wuzzy2@mail.ru>
Thu, 09 Aug 2018 17:47:29 +0200
changeset 13651 67d8f75f048d
parent 13649 1b536e268519
child 13652 7b506f1357e4
Backout 0f02dd1ff4c9. This is not how TotalRounds should work
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Wed Aug 08 18:36:12 2018 +0200
+++ b/hedgewars/uTeams.pas	Thu Aug 09 17:47:29 2018 +0200
@@ -193,26 +193,23 @@
 c:= CurrentTeam^.Clan^.ClanIndex;
 repeat
     with ClansArray[c]^ do
-        if (GameFlags and gfTagTeam) <> 0 then
+        if (CurrTeam = TagTeamIndex) and ((GameFlags and gfTagTeam) <> 0) then
             begin
-            if (CurrTeam = TagTeamIndex) then
-                begin
-                if (c = 0) and (not PlacingHogs) then
-                    inc(TotalRounds);
-                TagTeamIndex:= Pred(TagTeamIndex) mod TeamsNumber;
-                CurrTeam:= Pred(CurrTeam) mod TeamsNumber;
-                inc(c);
-                NextClan:= true;
-                end;
-            end
-        else if (c = 0) and (not PlacingHogs) then
-            inc(TotalRounds);
+            TagTeamIndex:= Pred(TagTeamIndex) mod TeamsNumber;
+            CurrTeam:= Pred(CurrTeam) mod TeamsNumber;
+            inc(c);
+            NextClan:= true;
+            end;
 
     if (GameFlags and gfTagTeam) = 0 then
         inc(c);
 
     if c = ClansCount then
-        c:= 0;
+        begin
+        if not PlacingHogs then
+            inc(TotalRounds);
+        c:= 0
+        end;
 
     with ClansArray[c]^ do
         begin