This commit is contained in:
GreYFoXGTi 2010-10-22 19:52:50 +02:00
commit 5b81175fb9
3 changed files with 14 additions and 5 deletions

View file

@ -541,6 +541,8 @@ void CClient::DisconnectWithReason(const char *pReason)
m_DemoPlayer.Stop();
m_DemoRecorder.Stop();
g_Config.m_ClServerBrowser = 0;
//
m_RconAuthed = 0;
m_NetClient.Disconnect(pReason);
@ -1722,6 +1724,9 @@ void CClient::Run()
Input()->MouseModeRelative();
}
if(Input()->KeyPressed(KEY_LCTRL) && Input()->KeyPressed(KEY_LSHIFT) && Input()->KeyDown('b'))
g_Config.m_ClServerBrowser ^= 1;
/*
if(!gfx_window_open())
break;

View file

@ -14,6 +14,7 @@ MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, 0, 2, CFGFLAG_CLIE
MACRO_CONFIG_INT(ClCpuThrottle, cl_cpu_throttle, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "", -1)
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "", -1)
MACRO_CONFIG_INT(ClServerBrowser, cl_serverbrowser, 0, 0, 1, CFGFLAG_CLIENT, "Whether to force the server browser", -1)
MACRO_CONFIG_INT(ClEventthread, cl_eventthread, 0, 0, 1, CFGFLAG_CLIENT, "Enables the usage of a thread to pump the events", -1)

View file

@ -796,7 +796,7 @@ int CMenus::Render()
s_First = false;
}
if(Client()->State() == IClient::STATE_ONLINE)
if(Client()->State() == IClient::STATE_ONLINE && !g_Config.m_ClServerBrowser)
{
ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame;
ms_ColorTabbarActive = ms_ColorTabbarActiveIngame;
@ -829,7 +829,7 @@ int CMenus::Render()
}
// render current page
if(Client()->State() != IClient::STATE_OFFLINE)
if(Client()->State() != IClient::STATE_OFFLINE && !g_Config.m_ClServerBrowser)
{
if(m_GamePage == PAGE_GAME)
RenderGame(MainView);
@ -1072,7 +1072,7 @@ void CMenus::SetActive(bool Active)
m_NeedSendinfo = false;
}
if(Client()->State() == IClient::STATE_ONLINE)
if(Client()->State() == IClient::STATE_ONLINE && !g_Config.m_ClServerBrowser)
{
m_pClient->OnRelease();
}
@ -1198,6 +1198,9 @@ void CMenus::OnRender()
RenderDemoPlayer(Screen);
}
if(g_Config.m_ClServerBrowser)
SetActive(true);
if(Client()->State() == IClient::STATE_ONLINE && m_pClient->m_ServerMode == m_pClient->SERVERMODE_PUREMOD)
{
Client()->Disconnect();
@ -1251,7 +1254,7 @@ void CMenus::OnRender()
UI()->Update(mx,my,mx*3.0f,my*3.0f,Buttons);
// render
if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
if(Client()->State() != IClient::STATE_DEMOPLAYBACK || g_Config.m_ClServerBrowser)
Render();
// render cursor