This commit is contained in:
aozhiwei 2023-10-30 15:57:34 +08:00
parent 94d816f70e
commit 8d99bb66f4
2 changed files with 4 additions and 2 deletions

View File

@ -1465,7 +1465,7 @@ void Player::PushJoinRoomMsg()
notifymsg.set_side(side); notifymsg.set_side(side);
GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg); GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg);
#ifdef DEBUG #ifdef DEBUG
a8::XPrintf("PushJoinRooMmsg %d\n", {GetUniId()}); a8::XPrintf("PushJoinRooMmsg %d side:%d\n", {GetUniId(), side});
#endif #endif
} }
} }

View File

@ -345,6 +345,9 @@ void Room::AddPlayer(Player* hum, std::shared_ptr<BornPoint> init_born_point, bo
if (!no_matchteam) { if (!no_matchteam) {
MatchTeam(hum); MatchTeam(hum);
} }
#ifdef DEBUG
hum->side = a8::RandEx(1, 2);
#endif
hum->PushJoinRoomMsg(); hum->PushJoinRoomMsg();
++alive_count_; ++alive_count_;
alive_count_chged_frameno_ = GetFrameNo(); alive_count_chged_frameno_ = GetFrameNo();
@ -375,7 +378,6 @@ void Room::AddPlayer(Player* hum, std::shared_ptr<BornPoint> init_born_point, bo
if (humans.size() != 7) { if (humans.size() != 7) {
abort(); abort();
} }
hum->side = a8::RandEx(1, 2);
Human* leader = hum; Human* leader = hum;
moba_team_a_ = leader->GetTeam(); moba_team_a_ = leader->GetTeam();
leader->born_point->wo_meta = std::get<0>(GetMapMeta()->moba_born_points.at(leader->side - 1)); leader->born_point->wo_meta = std::get<0>(GetMapMeta()->moba_born_points.at(leader->side - 1));