Make the initial ping in serverbrowser less wrong (still not perfect)

This commit is contained in:
def 2014-09-20 16:20:27 +02:00
parent 4ea77f1080
commit 3c833bd93e

View file

@ -875,6 +875,10 @@ int CMenus::Render()
static bool s_First = true;
if(s_First)
{
m_pClient->m_pSounds->Enqueue(CSounds::CHN_MUSIC, SOUND_MENU);
s_First = false;
m_DoubleClickIndex = -1;
if(g_Config.m_UiPage == PAGE_INTERNET)
ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);
else if(g_Config.m_UiPage == PAGE_LAN)
@ -883,9 +887,6 @@ int CMenus::Render()
ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
else if(g_Config.m_UiPage == PAGE_DDNET)
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
m_pClient->m_pSounds->Enqueue(CSounds::CHN_MUSIC, SOUND_MENU);
s_First = false;
m_DoubleClickIndex = -1;
}
if(Client()->State() == IClient::STATE_ONLINE)