Client fail to start if user not logged on

This commit is contained in:
Garry Newman 2016-10-28 10:41:13 +01:00
parent 3d9c1406f7
commit 6ea60a980b

View File

@ -31,12 +31,17 @@ internal bool InitClient()
if ( !api.SteamAPI_Init() )
return false;
var user = api.SteamAPI_GetHSteamUser();
var pipe = api.SteamAPI_GetHSteamPipe();
if ( pipe == 0 )
var huser = api.SteamAPI_GetHSteamUser();
var hpipe = api.SteamAPI_GetHSteamPipe();
if ( hpipe == 0 )
return false;
FillInterfaces( user, pipe );
FillInterfaces( huser, hpipe );
// Ensure that the user has logged into Steam. This will always return true if the game is launched
// from Steam, but if Steam is at the login prompt when you run your game it will return false.
if ( !user.BLoggedOn() )
return false;
return true;
}