This commit is contained in:
aozhiwei 2023-12-28 18:10:08 +08:00
parent c74d4fdbe0
commit b5fc67b67c

View File

@ -2050,6 +2050,9 @@ void Human::ReJoin(long ip_saddr, int socket_handle, std::shared_ptr<cs::CMJoin>
{
this->ip_saddr = ip_saddr;
this->socket_handle = socket_handle;
need_sync_active_player_ = true;
send_msg_times = 0;
last_sync_gas_frameno = 0;
PushJoinRoomMsg();
RefreshView();
room->NotifyUiUpdate();
@ -2325,12 +2328,14 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
new_team->SetInitTeamMemberNum(0);
new_team->SetAutoFill(true);
room_teams.push_back(new_team);
moba_team_a_ = new_team.get();
}
{
auto new_team = NewTeam();
new_team->SetInitTeamMemberNum(0);
new_team->SetAutoFill(true);
room_teams.push_back(new_team);
moba_team_b_ = new_team.get();
}
cs::CMJoin join_msg = *msg;
for (size_t i = 0; i < moba_teams.size(); ++i) {
@ -2402,9 +2407,9 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
hum->InitMobaRoad();
});
if (side == 1) {
side == 2;
side = 2;
} else {
side == 1;
side = 1;
}
}
{
@ -2413,6 +2418,9 @@ int Room::InitWithMobaBattle(long ip_saddr, int socket_handle, std::shared_ptr<c
hum->ReJoin(ip_saddr, socket_handle, msg, p);
}
}
#ifdef MYDEBUG
a8::XPrintf("InitWithMobaBattle\n", {});
#endif
return 0;
}