mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Fixes issue where Lobby Owner was being imporperly cached and not updating with the Lobby state.
This commit is contained in:
parent
fd14512e28
commit
d614b1544b
@ -415,19 +415,18 @@ public ulong Owner
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_owner == 0 && IsValid)
|
||||
if (IsValid)
|
||||
{
|
||||
_owner = client.native.matchmaking.GetLobbyOwner(CurrentLobby);
|
||||
return client.native.matchmaking.GetLobbyOwner(CurrentLobby);
|
||||
}
|
||||
return _owner;
|
||||
return 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (_owner == value) return;
|
||||
if (client.native.matchmaking.SetLobbyOwner(CurrentLobby, value)) { _owner = value; }
|
||||
if (Owner == value) return;
|
||||
client.native.matchmaking.SetLobbyOwner(CurrentLobby, value);
|
||||
}
|
||||
}
|
||||
ulong _owner = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Is the Lobby joinable by other people? Defaults to true;
|
||||
@ -490,7 +489,6 @@ public void Leave()
|
||||
{
|
||||
if (CurrentLobby != 0) { client.native.matchmaking.LeaveLobby(CurrentLobby); }
|
||||
CurrentLobby = 0;
|
||||
_owner = 0;
|
||||
CurrentLobbyData = null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user