修复房间匹配问题
This commit is contained in:
parent
23a948dff5
commit
e6b81c45a8
@ -44,7 +44,11 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (msg.force_entry_newbie_room()) {
|
if (msg.force_entry_newbie_room()) {
|
||||||
return RT_NewBrid;
|
if (msg.team_uuid().empty()) {
|
||||||
|
return RT_NewBrid;
|
||||||
|
} else {
|
||||||
|
return RT_MidBrid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (game_times <= 0) {
|
if (game_times <= 0) {
|
||||||
@ -83,7 +87,7 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rank >= 5 && rank <= 10) {
|
if (rank >= 0 && rank <= 10) {
|
||||||
return RT_OldBrid1;
|
return RT_OldBrid1;
|
||||||
} else if (rank >= 11 && rank <= 17) {
|
} else if (rank >= 11 && rank <= 17) {
|
||||||
return RT_OldBrid2;
|
return RT_OldBrid2;
|
||||||
@ -188,7 +192,9 @@ 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) {
|
||||||
for (Room* room : group_rooms[i]) {
|
for (Room* room : group_rooms[i]) {
|
||||||
return room;
|
if (room->GetRoomType() == self_room_type) {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CreateRoom(self_room_type, game_times);
|
return CreateRoom(self_room_type, game_times);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user