Merge pull request #62 from kkukshtel/master

This commit is contained in:
Garry Newman 2017-08-17 07:53:11 +01:00 committed by GitHub
commit a6b440324b
2 changed files with 7 additions and 8 deletions

View File

@ -94,6 +94,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Client\Achievements.cs" /> <Compile Include="Client\Achievements.cs" />
<Compile Include="Client\Client.cs" /> <Compile Include="Client\Client.cs" />
<Compile Include="Client\Lobby.cs" />
<Compile Include="Client\RichPresence.cs" /> <Compile Include="Client\RichPresence.cs" />
<Compile Include="Client\Leaderboard.cs" /> <Compile Include="Client\Leaderboard.cs" />
<Compile Include="Client\App.cs" /> <Compile Include="Client\App.cs" />

View File

@ -415,19 +415,18 @@ public ulong Owner
{ {
get get
{ {
if (_owner == 0 && IsValid) if (IsValid)
{ {
_owner = client.native.matchmaking.GetLobbyOwner(CurrentLobby); return client.native.matchmaking.GetLobbyOwner(CurrentLobby);
} }
return _owner; return 0;
} }
private set set
{ {
if (_owner == value) return; if (Owner == value) return;
if (client.native.matchmaking.SetLobbyOwner(CurrentLobby, value)) { _owner = value; } client.native.matchmaking.SetLobbyOwner(CurrentLobby, value);
} }
} }
ulong _owner = 0;
/// <summary> /// <summary>
/// Is the Lobby joinable by other people? Defaults to true; /// 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); } if (CurrentLobby != 0) { client.native.matchmaking.LeaveLobby(CurrentLobby); }
CurrentLobby = 0; CurrentLobby = 0;
_owner = 0;
CurrentLobbyData = null; CurrentLobbyData = null;
} }