mirror of
https://github.com/celisej567/source-engine.git
synced 2026-09-06 20:13:51 +03:00
WIP: Begin rewriting serverbrowser
This commit is contained in:
@@ -293,7 +293,10 @@ void CDialogGameInfo::PerformLayout()
|
||||
}
|
||||
SetControlString("PlayersText", buf);
|
||||
|
||||
if ( m_Server.m_NetAdr.GetIP() && m_Server.m_NetAdr.GetQueryPort() )
|
||||
SetControlString("ServerIPText", m_Server.m_NetAdr.GetConnectionAddressString() );
|
||||
m_pConnectButton->SetEnabled(true);
|
||||
|
||||
/* if ( m_Server.m_NetAdr.GetIP() && m_Server.m_NetAdr.GetQueryPort() )
|
||||
{
|
||||
SetControlString("ServerIPText", m_Server.m_NetAdr.GetConnectionAddressString() );
|
||||
m_pConnectButton->SetEnabled(true);
|
||||
@@ -312,7 +315,7 @@ void CDialogGameInfo::PerformLayout()
|
||||
{
|
||||
SetControlString("ServerIPText", "");
|
||||
m_pConnectButton->SetEnabled(false);
|
||||
}
|
||||
}*/
|
||||
|
||||
if ( m_Server.m_bHadSuccessfulResponse )
|
||||
{
|
||||
@@ -405,7 +408,11 @@ void CDialogGameInfo::OnConnect()
|
||||
|
||||
// need to refresh server before attempting to connect, to make sure there is enough room on the server
|
||||
m_iRequestRetry = 0;
|
||||
RequestInfo();
|
||||
|
||||
ConnectToServer();
|
||||
|
||||
//TODO(nillerusr): restore this later
|
||||
//RequestInfo();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -633,17 +640,6 @@ void CDialogGameInfo::ConnectToServer()
|
||||
{
|
||||
m_bConnecting = false;
|
||||
|
||||
// check VAC status
|
||||
if ( m_Server.m_bSecure && ServerBrowser().IsVACBannedFromGame( m_Server.m_nAppID ) )
|
||||
{
|
||||
// refuse the user
|
||||
CVACBannedConnRefusedDialog *pDlg = new CVACBannedConnRefusedDialog( GetVParent(), "VACBannedConnRefusedDialog" );
|
||||
pDlg->Activate();
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// check to see if we need a password
|
||||
if ( m_Server.m_bPassword && !m_szPassword[0] )
|
||||
{
|
||||
@@ -654,7 +650,9 @@ void CDialogGameInfo::ConnectToServer()
|
||||
}
|
||||
|
||||
// check the player count
|
||||
if ( m_Server.m_nPlayers >= m_Server.m_nMaxPlayers )
|
||||
|
||||
// nillerusr
|
||||
/*if ( m_Server.m_nPlayers >= m_Server.m_nMaxPlayers )
|
||||
{
|
||||
// mark why we cannot connect
|
||||
m_bServerFull = true;
|
||||
@@ -662,7 +660,7 @@ void CDialogGameInfo::ConnectToServer()
|
||||
m_bShowAutoRetryToggle = true;
|
||||
InvalidateLayout();
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
// tell the engine to connect
|
||||
const char *gameDir = m_Server.m_szGameDir;
|
||||
|
||||
Reference in New Issue
Block a user