This commit is contained in:
aozhiwei 2023-09-06 13:09:13 +08:00
parent 634895a142
commit c2f9dff2c8

View File

@ -108,6 +108,13 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
MatchMgr::Instance()->_CMJoin(hdr, msg);
return;
}
if (msg.proto_version() >= cs::ProtoVersion) {
const mt::Map* map_meta = mt::Map::GetById(msg.mapid());
if (!map_meta) {
JoinErrorHandle(msg, 3, hdr.socket_handle);
return;
}
}
std::shared_ptr<cs::CMJoin> join_msg = std::make_shared<cs::CMJoin>();
*join_msg = msg;
std::vector<std::shared_ptr<cs::CMJoin>> join_msgs{join_msg};