fix team
This commit is contained in:
parent
33c54b878a
commit
a58f0de587
@ -1518,6 +1518,26 @@ void Room::CombineTeam()
|
|||||||
if (need_combine_teams.size() < 2) {
|
if (need_combine_teams.size() < 2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (total_count == 3) {
|
||||||
|
int del_team_id = 0;
|
||||||
|
for (auto& pair : need_combine_teams) {
|
||||||
|
if (pair.first != first_team_id) {
|
||||||
|
del_team_id = pair.first;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (del_team_id != 0) {
|
||||||
|
auto itr = need_combine_teams.find(del_team_id);
|
||||||
|
if (itr != need_combine_teams.end()) {
|
||||||
|
total_count -= itr->second->GetTeamNum();
|
||||||
|
need_combine_teams.erase(itr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (total_count <= 0) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
size_t first_team_num = 4;
|
size_t first_team_num = 4;
|
||||||
switch (total_count) {
|
switch (total_count) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user