mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix: Dummy can connect without port
This commit is contained in:
parent
1296b1bf49
commit
f0ed57a9a3
|
@ -703,22 +703,10 @@ void CClient::DummyConnect()
|
||||||
if(m_NetClient[0].State() != NET_CONNSTATE_ONLINE && m_NetClient[0].State() != NET_CONNSTATE_PENDING)
|
if(m_NetClient[0].State() != NET_CONNSTATE_ONLINE && m_NetClient[0].State() != NET_CONNSTATE_PENDING)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char aBuf[512];
|
|
||||||
|
|
||||||
m_NetClient[1].Disconnect(0);
|
m_NetClient[1].Disconnect(0);
|
||||||
|
|
||||||
str_copy(aBuf, g_Config.m_UiServerAddress, sizeof(aBuf));
|
|
||||||
|
|
||||||
m_RconAuthed[1] = 0;
|
m_RconAuthed[1] = 0;
|
||||||
|
|
||||||
if(net_host_lookup(m_aServerAddressStr, &m_ServerAddress, m_NetClient[1].NetType()) != 0)
|
|
||||||
{
|
|
||||||
char aBufMsg[256];
|
|
||||||
str_format(aBufMsg, sizeof(aBufMsg), "could not find the address of %s, connecting to localhost", aBuf);
|
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "client", aBufMsg);
|
|
||||||
net_host_lookup("localhost", &m_ServerAddress, m_NetClient[1].NetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
//connecting to the server
|
//connecting to the server
|
||||||
m_NetClient[1].Connect(&m_ServerAddress);
|
m_NetClient[1].Connect(&m_ServerAddress);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue