From dfc8be4a7c71118389244b4e005a7faaefcceae2 Mon Sep 17 00:00:00 2001 From: otavepto Date: Thu, 29 Feb 2024 02:38:51 +0200 Subject: [PATCH] change the server type parameter of the request before continuing the code, since it's used multiple times and also being set in the request object --- dll/steam_matchmaking_servers.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dll/steam_matchmaking_servers.cpp b/dll/steam_matchmaking_servers.cpp index cd386d76..2a3ccec4 100644 --- a/dll/steam_matchmaking_servers.cpp +++ b/dll/steam_matchmaking_servers.cpp @@ -42,6 +42,11 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS ++server_list_request; HServerListRequest id = (char *)0 + server_list_request; // (char *)0 silences the compiler warning + if (settings->matchmaking_server_list_always_lan_type) { + PRINT_DEBUG("Steam_Matchmaking_Servers::RequestServerList forcing request type to LAN\n"); + type = EMatchMakingType::eLANServer; + } + struct Steam_Matchmaking_Request request{}; request.appid = iApp; request.callbacks = pRequestServersResponse; @@ -53,7 +58,7 @@ HServerListRequest Steam_Matchmaking_Servers::RequestServerList(AppId_t iApp, IS requests.push_back(request); PRINT_DEBUG("Steam_Matchmaking_Servers::request id: %p\n", id); - if (type == eLANServer || settings->matchmaking_server_list_always_lan_type) return id; + if (type == eLANServer) return id; if (type == eFriendsServer) { for (auto &g : gameservers_friends) {