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:
Robert Müller 2024-03-27 22:24:13 +01:00
parent 9ffa9d8e0a
commit c7403ef06d
2 changed files with 2 additions and 4 deletions

View file

@ -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);

View file

@ -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();