mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
WIP: Begin rewriting serverbrowser
This commit is contained in:
@@ -19,6 +19,7 @@ CServerBrowser &ServerBrowser()
|
||||
}
|
||||
|
||||
IRunGameEngine *g_pRunGameEngine = NULL;
|
||||
IServersInfo *g_pServersInfo = NULL;
|
||||
|
||||
static CSteamAPIContext g_SteamAPIContext;
|
||||
CSteamAPIContext *steamapicontext = &g_SteamAPIContext;
|
||||
@@ -79,11 +80,12 @@ bool CServerBrowser::Initialize(CreateInterfaceFn *factorylist, int factoryCount
|
||||
for ( int i = 0; i < factoryCount; ++i )
|
||||
{
|
||||
if ( !g_pEngineReplay )
|
||||
{
|
||||
g_pEngineReplay = ( IEngineReplay * )factorylist[ i ]( ENGINE_REPLAY_INTERFACE_VERSION, NULL );
|
||||
}
|
||||
if( !g_pServersInfo )
|
||||
g_pServersInfo = ( IServersInfo * )factorylist[ i ]( SERVERLIST_INTERFACE_VERSION, NULL );
|
||||
}
|
||||
|
||||
|
||||
SteamAPI_InitSafe();
|
||||
SteamAPI_SetTryCatchCallbacks( false ); // We don't use exceptions, so tell steam not to use try/catch in callback handlers
|
||||
steamapicontext->Init();
|
||||
@@ -304,7 +306,7 @@ void CServerBrowser::Shutdown()
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CServerBrowser::OpenGameInfoDialog( uint64 ulSteamIDFriend, const char *pszConnectCode )
|
||||
{
|
||||
#if !defined( _X360 ) // X360TBD: SteamFriends()
|
||||
#if 0
|
||||
if ( m_hInternetDlg.Get() )
|
||||
{
|
||||
// activate an already-existing dialog
|
||||
@@ -337,11 +339,11 @@ bool CServerBrowser::OpenGameInfoDialog( uint64 ulSteamIDFriend, const char *psz
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CServerBrowser::JoinGame( uint64 ulSteamIDFriend, const char *pszConnectCode )
|
||||
{
|
||||
if ( OpenGameInfoDialog( ulSteamIDFriend, pszConnectCode ) )
|
||||
/* if ( OpenGameInfoDialog( ulSteamIDFriend, pszConnectCode ) )
|
||||
{
|
||||
CDialogGameInfo *pDialogGameInfo = m_hInternetDlg->GetDialogGameInfoForFriend( ulSteamIDFriend );
|
||||
pDialogGameInfo->Connect();
|
||||
}
|
||||
}*/
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -362,11 +364,13 @@ bool CServerBrowser::JoinGame( uint32 unGameIP, uint16 usGamePort, const char *p
|
||||
//-----------------------------------------------------------------------------
|
||||
void CServerBrowser::CloseGameInfoDialog( uint64 ulSteamIDFriend )
|
||||
{
|
||||
#if 0
|
||||
CDialogGameInfo *pDialogGameInfo = m_hInternetDlg->GetDialogGameInfoForFriend( ulSteamIDFriend );
|
||||
if ( pDialogGameInfo )
|
||||
{
|
||||
pDialogGameInfo->Close();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user