1
This commit is contained in:
parent
99dfdb022a
commit
734c4d958c
@ -1092,14 +1092,18 @@ bool Room::CanJoin(const std::string& accountid,
|
||||
GetHumanNum() >= GetRoomMaxPlayerNum()
|
||||
) {
|
||||
bool have_team = false;
|
||||
for (auto& pair : human_hash_) {
|
||||
if (pair.second->team_uuid == msg.team_uuid()) {
|
||||
if (pair.second->GetTeam() && !pair.second->GetTeam()->IsFull()) {
|
||||
TraverseHumanList
|
||||
(
|
||||
[&have_team, &msg] (Human* ele_hum) -> bool
|
||||
{
|
||||
if (ele_hum->team_uuid == msg.team_uuid()) {
|
||||
if (ele_hum->GetTeam() && !ele_hum->GetTeam()->IsFull()) {
|
||||
have_team = true;
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}//end for human_hash_
|
||||
return true;
|
||||
});
|
||||
if (have_team) {
|
||||
while (GetHumanNum() >= GetRoomMaxPlayerNum()) {
|
||||
RandRemoveAndroid();
|
||||
|
Loading…
x
Reference in New Issue
Block a user