mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Hacky way to join tutorial from LAN
This commit is contained in:
parent
ebd76d9db5
commit
3ee8d880fe
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include <engine/external/json-parser/json.h>
|
||||
|
||||
#include <game/client/components/menus.h> // PAGE_DDNET
|
||||
|
||||
class SortWrap
|
||||
{
|
||||
typedef bool (CServerBrowser::*SortFunc)(int, int) const;
|
||||
|
@ -1522,6 +1524,11 @@ void CServerBrowser::LoadDDNetInfoJson()
|
|||
|
||||
const char *CServerBrowser::GetTutorialServer()
|
||||
{
|
||||
// Use DDNet tab as default after joining tutorial, also makes sure Find() actually works
|
||||
// Note that when no server info has been loaded yet, this will not return a result immediately.
|
||||
g_Config.m_UiPage = CMenus::PAGE_DDNET;
|
||||
Refresh(IServerBrowser::TYPE_DDNET);
|
||||
|
||||
CNetwork *pNetwork = &m_aNetworks[NETWORK_DDNET];
|
||||
const char *pBestAddr = nullptr;
|
||||
int BestLatency = std::numeric_limits<int>::max();
|
||||
|
|
Loading…
Reference in a new issue