This commit is contained in:
aozhiwei 2022-10-23 07:46:54 +08:00
parent b0aed04798
commit 20c0b0f535
2 changed files with 4 additions and 3 deletions

View File

@ -300,7 +300,7 @@ void MatchTeam::UpdateMaster()
TryCombineTeam(); TryCombineTeam();
} }
} }
if (phase_left_time_ <= 0 || GetPredictMemberNum() >= MAX_TEAM_NUM) { if (phase_left_time_ <= 0 || !HaveEmptySlot()) {
ChooseLeader(); ChooseLeader();
phase_ = kMatchChoose; phase_ = kMatchChoose;
phase_start_tick_ = a8::XGetTickCount(); phase_start_tick_ = a8::XGetTickCount();
@ -313,7 +313,8 @@ void MatchTeam::UpdateMaster()
UpdateTeamState(); UpdateTeamState();
CheckChoose(); CheckChoose();
CheckPrepare(); CheckPrepare();
if ((phase_left_time_ <= MetaMgr::Instance()->match_lock_time) || IsAllPrepare()) { if ((phase_left_time_ <= MetaMgr::Instance()->match_lock_time) ||
IsAllPrepare()) {
for (int i = 0; i < MAX_TEAM_NUM; ++i) { for (int i = 0; i < MAX_TEAM_NUM; ++i) {
AutoChoose(true); AutoChoose(true);
} }

View File

@ -1,4 +1,4 @@
#pragma once #pragma once
#include "cs_proto.pb.h" #include "cs_proto.pb.h"