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

@ -540,6 +540,8 @@ void CClient::DisconnectWithReason(const char *pReason)
// stop demo playback and recorder // stop demo playback and recorder
m_DemoPlayer.Stop(); m_DemoPlayer.Stop();
m_DemoRecorder.Stop(); m_DemoRecorder.Stop();
g_Config.m_ClServerBrowser = 0;
// //
m_RconAuthed = 0; m_RconAuthed = 0;
@ -1721,6 +1723,9 @@ void CClient::Run()
g_Config.m_ClEditor = g_Config.m_ClEditor^1; g_Config.m_ClEditor = g_Config.m_ClEditor^1;
Input()->MouseModeRelative(); Input()->MouseModeRelative();
} }
if(Input()->KeyPressed(KEY_LCTRL) && Input()->KeyPressed(KEY_LSHIFT) && Input()->KeyDown('b'))
g_Config.m_ClServerBrowser ^= 1;
/* /*
if(!gfx_window_open()) if(!gfx_window_open())

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(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(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) 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; s_First = false;
} }
if(Client()->State() == IClient::STATE_ONLINE) if(Client()->State() == IClient::STATE_ONLINE && !g_Config.m_ClServerBrowser)
{ {
ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame; ms_ColorTabbarInactive = ms_ColorTabbarInactiveIngame;
ms_ColorTabbarActive = ms_ColorTabbarActiveIngame; ms_ColorTabbarActive = ms_ColorTabbarActiveIngame;
@ -829,7 +829,7 @@ int CMenus::Render()
} }
// render current page // render current page
if(Client()->State() != IClient::STATE_OFFLINE) if(Client()->State() != IClient::STATE_OFFLINE && !g_Config.m_ClServerBrowser)
{ {
if(m_GamePage == PAGE_GAME) if(m_GamePage == PAGE_GAME)
RenderGame(MainView); RenderGame(MainView);
@ -1072,7 +1072,7 @@ void CMenus::SetActive(bool Active)
m_NeedSendinfo = false; m_NeedSendinfo = false;
} }
if(Client()->State() == IClient::STATE_ONLINE) if(Client()->State() == IClient::STATE_ONLINE && !g_Config.m_ClServerBrowser)
{ {
m_pClient->OnRelease(); m_pClient->OnRelease();
} }
@ -1187,7 +1187,7 @@ void CMenus::OnRender()
Graphics()->QuadsDrawTL(60, 60, 5000, 5000); Graphics()->QuadsDrawTL(60, 60, 5000, 5000);
Graphics()->QuadsEnd(); Graphics()->QuadsEnd();
return;*/ return;*/
if(Client()->State() != IClient::STATE_ONLINE && Client()->State() != IClient::STATE_DEMOPLAYBACK) if(Client()->State() != IClient::STATE_ONLINE && Client()->State() != IClient::STATE_DEMOPLAYBACK)
SetActive(true); SetActive(true);
@ -1197,6 +1197,9 @@ void CMenus::OnRender()
Graphics()->MapScreen(Screen.x, Screen.y, Screen.w, Screen.h); Graphics()->MapScreen(Screen.x, Screen.y, Screen.w, Screen.h);
RenderDemoPlayer(Screen); RenderDemoPlayer(Screen);
} }
if(g_Config.m_ClServerBrowser)
SetActive(true);
if(Client()->State() == IClient::STATE_ONLINE && m_pClient->m_ServerMode == m_pClient->SERVERMODE_PUREMOD) if(Client()->State() == IClient::STATE_ONLINE && m_pClient->m_ServerMode == m_pClient->SERVERMODE_PUREMOD)
{ {
@ -1251,7 +1254,7 @@ void CMenus::OnRender()
UI()->Update(mx,my,mx*3.0f,my*3.0f,Buttons); UI()->Update(mx,my,mx*3.0f,my*3.0f,Buttons);
// render // render
if(Client()->State() != IClient::STATE_DEMOPLAYBACK) if(Client()->State() != IClient::STATE_DEMOPLAYBACK || g_Config.m_ClServerBrowser)
Render(); Render();
// render cursor // render cursor