Skip to content

Commit

Permalink
net: Add separate host string for TCP and WS
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Mar 24, 2024
1 parent 182d69d commit 3d8d11b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Source/Network/ServerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ struct NetRelay_RoomInfo {
};

struct NetRelay_LobbyWithRooms {
std::string host = {};
std::string host_tcp = {};
std::string host_ws = {};
std::vector<NetRelay_RoomInfo> rooms = {};

SERIALIZE(ar) {
ar & WRAP_OBJECT(host);
ar & WRAP_OBJECT(host_tcp);
ar & WRAP_OBJECT(host_ws);
ar & WRAP_OBJECT(rooms);
}
};
Expand Down Expand Up @@ -126,7 +128,11 @@ void ServerList::fetchRelayHostInfoList() {
for (auto& lobby : lobbies) {
for (auto& room : lobby.rooms) {
GameInfo info;
info.gameHost = lobby.host;
#ifdef GPX
info.gameHost = lobby.host_ws;
#else
info.gameHost = lobby.host_tcp;
#endif
info.gameRoomID = room.room_id;
info.gameName = room.room_name;
info.gameVersion = room.game_version;
Expand Down

0 comments on commit 3d8d11b

Please sign in to comment.