--- 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