1
This commit is contained in:
parent
9bc5b16112
commit
6d435c5f7a
@ -219,7 +219,6 @@ void MatchTeam::Update()
|
||||
} else {
|
||||
UpdateSlave();
|
||||
}
|
||||
master_team_->SyncMatchInfo();
|
||||
if (phase_ == kMatchStartGame && IsMasterTeam()) {
|
||||
StartGame();
|
||||
}
|
||||
@ -321,6 +320,7 @@ void MatchTeam::UpdateMaster()
|
||||
}
|
||||
break;
|
||||
}
|
||||
master_team_->SyncMatchInfo();
|
||||
}
|
||||
|
||||
void MatchTeam::UpdateSlave()
|
||||
@ -513,7 +513,19 @@ void MatchTeam::ShuaRobot()
|
||||
|
||||
void MatchTeam::StartGame()
|
||||
{
|
||||
RoomMgr::Instance()->JoinTeam(this);
|
||||
{
|
||||
int valid_socket_num = 0;
|
||||
for (auto& member : curr_member_hash_) {
|
||||
if (member->socket_handle != 0) {
|
||||
if (MatchMgr::Instance()->GetMatchInfo(member->socket_handle)) {
|
||||
++valid_socket_num;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (valid_socket_num > 0) {
|
||||
RoomMgr::Instance()->JoinTeam(this);
|
||||
}
|
||||
}
|
||||
for (auto& member : curr_member_hash_) {
|
||||
if (member->socket_handle != 0) {
|
||||
MatchMgr::Instance()->RemoveSocket(member->socket_handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user