mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Check CNetClient::State
instead of SecurityTokenUnknown
Send dummy ready and enter game when connection is online based on its state instead of when the security token is not unknown anymore, which should effectively be the same condition but more understandable. This is also how it's already done for the main connection so the `SecurityTokenUnknown` function can be removed as it's unused now.
This commit is contained in:
parent
9ffa9d8e0a
commit
c7403ef06d
|
@ -2862,8 +2862,8 @@ void CClient::Run()
|
|||
m_aCmdEditMap[0] = 0;
|
||||
}
|
||||
|
||||
// progress on dummy connect if security token handshake skipped/passed
|
||||
if(m_DummySendConnInfo && !m_aNetClient[CONN_DUMMY].SecurityTokenUnknown())
|
||||
// progress on dummy connect when the connection is online
|
||||
if(m_DummySendConnInfo && m_aNetClient[CONN_DUMMY].State() == NETSTATE_ONLINE)
|
||||
{
|
||||
m_DummySendConnInfo = false;
|
||||
SendInfo(CONN_DUMMY);
|
||||
|
|
|
@ -515,8 +515,6 @@ public:
|
|||
int GotProblems(int64_t MaxLatency) const;
|
||||
const char *ErrorString() const;
|
||||
|
||||
bool SecurityTokenUnknown() { return m_Connection.SecurityToken() == NET_SECURITY_TOKEN_UNKNOWN; }
|
||||
|
||||
// stun
|
||||
void FeedStunServer(NETADDR StunServer);
|
||||
void RefreshStun();
|
||||
|
|
Loading…
Reference in a new issue