1
This commit is contained in:
parent
2ae6a19c74
commit
fc558fafe5
@ -2313,6 +2313,12 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
|
||||
return true;
|
||||
});
|
||||
};
|
||||
for (size_t i = 0; i < 2; ++i) {
|
||||
auto team = room_teams.at(i);
|
||||
for (size_t ii = team->GetMemberNum(); ii < MAX_TEAM_NUM; ++ii) {
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ void Room::ShowAndroid(Human* target, int num)
|
||||
}
|
||||
}
|
||||
|
||||
void Room::CreateAndroid(int robot_num)
|
||||
void Room::CreateAndroid(int robot_num, std::shared_ptr<Team> team)
|
||||
{
|
||||
for (int i = 0; i < robot_num; ++i) {
|
||||
if (human_hash_.size() >= GetRoomMaxPlayerNum()) {
|
||||
@ -499,7 +499,11 @@ void Room::CreateAndroid(int robot_num)
|
||||
hum->Initialize();
|
||||
AddToEntityHash(hum);
|
||||
AddToHumanHash(hum);
|
||||
MatchTeam(hum);
|
||||
if (team) {
|
||||
team->AddMember(hum);
|
||||
} else {
|
||||
MatchTeam(hum);
|
||||
}
|
||||
++alive_count_;
|
||||
alive_count_chged_frameno_ = GetFrameNo();
|
||||
++PerfMonitor::Instance()->alive_count;
|
||||
|
@ -283,11 +283,11 @@ public:
|
||||
int GenShotUniid() { return ++current_shot_uniid_; }
|
||||
int InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin> msg,
|
||||
std::shared_ptr<MobaBattle> p);
|
||||
void CreateAndroid(int android_num, std::shared_ptr<Team> team = nullptr);
|
||||
|
||||
private:
|
||||
void ShuaAndroid();
|
||||
void ShowAndroid(Human* target, int num);
|
||||
void CreateAndroid(int android_num);
|
||||
void UpdateGas();
|
||||
void UpdateGasInactive();
|
||||
void UpdateGasInactivePvp();
|
||||
|
Loading…
x
Reference in New Issue
Block a user