优化匹配规则
This commit is contained in:
parent
23d3273828
commit
97c7d1d5e8
@ -166,10 +166,16 @@ Room* RoomMgr::GetJoinableRoom(const cs::CMJoin& msg, const RoomType_e self_room
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < RT_Max; ++i) {
|
for (int i = 0; i < RT_Max; ++i) {
|
||||||
if (i != self_room_type) {
|
if (RoomNum() > ROOM_NUM_DOWN_LIMIT - 5) {
|
||||||
for (Room* room : group_rooms[i]) {
|
for (Room* room : group_rooms[i]) {
|
||||||
return room;
|
return room;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (i != self_room_type) {
|
||||||
|
for (Room* room : group_rooms[i]) {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user