Remove chat timeout code fallback heuristic

KoG is now on the newest version, we no longer need this.
This commit is contained in:
heinrich5991 2022-10-11 16:07:43 +02:00
parent 150485e3b0
commit a595936fb5
2 changed files with 1 additions and 12 deletions

View file

@ -1561,15 +1561,6 @@ void CClient::ProcessServerInfo(int RawType, NETADDR *pFrom, const void *pData,
#undef GET_INT #undef GET_INT
} }
bool CClient::ShouldSendChatTimeoutCodeHeuristic()
{
if(m_ServerSentCapabilities)
{
return false;
}
return str_find_nocase(m_CurrentServerInfo.m_aGameType, "ddracenet") || str_find_nocase(m_CurrentServerInfo.m_aGameType, "ddnet");
}
static CServerCapabilities GetServerCapabilities(int Version, int Flags) static CServerCapabilities GetServerCapabilities(int Version, int Flags)
{ {
CServerCapabilities Result; CServerCapabilities Result;
@ -2156,7 +2147,7 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
if(m_aReceivedSnapshots[Conn] > 50 && !m_aCodeRunAfterJoin[Conn]) if(m_aReceivedSnapshots[Conn] > 50 && !m_aCodeRunAfterJoin[Conn])
{ {
if(m_ServerCapabilities.m_ChatTimeoutCode || ShouldSendChatTimeoutCodeHeuristic()) if(m_ServerCapabilities.m_ChatTimeoutCode)
{ {
CNetMsg_Cl_Say MsgP; CNetMsg_Cl_Say MsgP;
MsgP.m_Team = 0; MsgP.m_Team = 0;

View file

@ -251,8 +251,6 @@ class CClient : public IClient, public CDemoPlayer::IListener
bool m_ServerSentCapabilities; bool m_ServerSentCapabilities;
CServerCapabilities m_ServerCapabilities; CServerCapabilities m_ServerCapabilities;
bool ShouldSendChatTimeoutCodeHeuristic();
CServerInfo m_CurrentServerInfo; CServerInfo m_CurrentServerInfo;
int64_t m_CurrentServerInfoRequestTime; // >= 0 should request, == -1 got info int64_t m_CurrentServerInfoRequestTime; // >= 0 should request, == -1 got info