This commit is contained in:
aozhiwei 2023-04-04 18:13:59 +08:00
parent a58f0de587
commit 2aca300cd2

View File

@ -1515,7 +1515,7 @@ void Room::CombineTeam()
return; return;
} }
if (need_combine_teams.size() < 2) { if (need_combine_teams.size() <= 2) {
return; return;
} }
if (total_count == 3) { if (total_count == 3) {
@ -1529,12 +1529,11 @@ void Room::CombineTeam()
if (del_team_id != 0) { if (del_team_id != 0) {
auto itr = need_combine_teams.find(del_team_id); auto itr = need_combine_teams.find(del_team_id);
if (itr != need_combine_teams.end()) { if (itr != need_combine_teams.end()) {
total_count -= itr->second->GetTeamNum(); total_count -= itr->second;
need_combine_teams.erase(itr); need_combine_teams.erase(itr);
break;
} }
} }
if (total_count <= 0) { if (total_count <= 1) {
abort(); abort();
} }
} }