This commit is contained in:
aozhiwei 2023-06-04 09:58:25 +08:00
parent e544573967
commit 02b01be9f5

View File

@ -35,7 +35,7 @@
const int ROOM_NUM_UP_LIMIT = 1000; const int ROOM_NUM_UP_LIMIT = 1000;
const int HUM_NUM_DOWN_LIMIT = 2500; const int HUM_NUM_DOWN_LIMIT = 2500;
static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times) static RoomType_e GetHumanRoomType(const std::shared_ptr<BattleDataContext> netdata)
{ {
return RoomType_OldBrid1; return RoomType_OldBrid1;
} }
@ -117,7 +117,7 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
return; return;
} }
int game_times = 0; int game_times = 0;
RoomType_e self_room_type = GetHumanRoomType(msg, game_times); RoomType_e self_room_type = GetHumanRoomType(results.at(0));
if (self_room_type < RoomType_OldBrid1) { if (self_room_type < RoomType_OldBrid1) {
self_room_type = RoomType_OldBrid1; self_room_type = RoomType_OldBrid1;
} }
@ -861,7 +861,7 @@ void RoomMgr::EnterNewBie(f8::MsgHdr& hdr, const cs::CMJoin& msg)
} }
int game_times = 0; int game_times = 0;
RoomType_e self_room_type = GetHumanRoomType(msg, game_times); RoomType_e self_room_type = GetHumanRoomType(context);
if (self_room_type < RoomType_OldBrid1) { if (self_room_type < RoomType_OldBrid1) {
self_room_type = RoomType_OldBrid1; self_room_type = RoomType_OldBrid1;
} }