From a22ca27c26d82a5c8219985700c74446cf43d787 Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Tue, 25 Aug 2020 23:14:23 -0400 Subject: [PATCH] Don't trust anyone especially not the steam sdk docs. --- dll/steam_matchmaking.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dll/steam_matchmaking.h b/dll/steam_matchmaking.h index 04415b1..3b64c3a 100644 --- a/dll/steam_matchmaking.h +++ b/dll/steam_matchmaking.h @@ -1100,7 +1100,7 @@ bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable ) // returns the current lobby owner -// you must be a member of the lobby to access this +// you must be a member of the lobby to access this (Mr_Goldberg note: This is a lie) // there always one lobby owner - if the current owner leaves, another user will become the owner // it is possible (bur rare) to join a lobby just as the owner is leaving, thus entering a lobby with self as the owner CSteamID GetLobbyOwner( CSteamID steamIDLobby ) @@ -1110,11 +1110,8 @@ CSteamID GetLobbyOwner( CSteamID steamIDLobby ) Lobby *lobby = get_lobby(steamIDLobby); if (!lobby || lobby->deleted()) return k_steamIDNil; - Lobby_Member *member = get_lobby_member(lobby, settings->get_local_steam_id()); - CSteamID id = k_steamIDNil; - if (member) id = (uint64)lobby->owner(); - - return id; + //TODO: might be better to require the lobby info to be at least requested first. + return (uint64)lobby->owner(); }