mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 05:31:29 +00:00
In CheckTeamLeader, make sure to only set one client as team leader. Reported by Tobias Kuehnhammer.
This commit is contained in:
parent
f8c421025e
commit
22ecd68cf2
1 changed files with 8 additions and 5 deletions
|
@ -1644,11 +1644,14 @@ void CheckTeamLeader( int team ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( i = 0 ; i < level.maxclients ; i++ ) {
|
|
||||||
if (level.clients[i].sess.sessionTeam != team)
|
if (i >= level.maxclients) {
|
||||||
continue;
|
for ( i = 0 ; i < level.maxclients ; i++ ) {
|
||||||
level.clients[i].sess.teamLeader = qtrue;
|
if (level.clients[i].sess.sessionTeam != team)
|
||||||
break;
|
continue;
|
||||||
|
level.clients[i].sess.teamLeader = qtrue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue