mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 20:38:07 +01:00
Don't trust anyone especially not the steam sdk docs.
This commit is contained in:
parent
4180911fec
commit
a22ca27c26
1 changed files with 3 additions and 6 deletions
|
@ -1100,7 +1100,7 @@ bool SetLobbyJoinable( CSteamID steamIDLobby, bool bLobbyJoinable )
|
||||||
|
|
||||||
|
|
||||||
// returns the current lobby owner
|
// 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
|
// 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
|
// 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 )
|
CSteamID GetLobbyOwner( CSteamID steamIDLobby )
|
||||||
|
@ -1110,11 +1110,8 @@ CSteamID GetLobbyOwner( CSteamID steamIDLobby )
|
||||||
Lobby *lobby = get_lobby(steamIDLobby);
|
Lobby *lobby = get_lobby(steamIDLobby);
|
||||||
if (!lobby || lobby->deleted()) return k_steamIDNil;
|
if (!lobby || lobby->deleted()) return k_steamIDNil;
|
||||||
|
|
||||||
Lobby_Member *member = get_lobby_member(lobby, settings->get_local_steam_id());
|
//TODO: might be better to require the lobby info to be at least requested first.
|
||||||
CSteamID id = k_steamIDNil;
|
return (uint64)lobby->owner();
|
||||||
if (member) id = (uint64)lobby->owner();
|
|
||||||
|
|
||||||
return id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue