From 1f0467b5451bb4d75ef30fdea12bf2d6855649e2 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Fri, 16 Aug 2024 13:34:38 +0800 Subject: [PATCH] Use error log level for snap crc errors A snapshot crc error should not happen. If it does happen it will cause lags and it means something is really wrong. --- src/engine/client/client.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 857fec84e..36c372c1b 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -1947,13 +1948,8 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy) if(Msg != NETMSG_SNAPEMPTY && pTmpBuffer3->Crc() != Crc) { - if(g_Config.m_Debug) - { - char aBuf[256]; - str_format(aBuf, sizeof(aBuf), "snapshot crc error #%d - tick=%d wantedcrc=%d gotcrc=%d compressed_size=%d delta_tick=%d", - m_SnapCrcErrors, GameTick, Crc, pTmpBuffer3->Crc(), m_aSnapshotIncomingDataSize[Conn], DeltaTick); - m_pConsole->Print(IConsole::OUTPUT_LEVEL_DEBUG, "client", aBuf); - } + log_error("client", "snapshot crc error #%d - tick=%d wantedcrc=%d gotcrc=%d compressed_size=%d delta_tick=%d", + m_SnapCrcErrors, GameTick, Crc, pTmpBuffer3->Crc(), m_aSnapshotIncomingDataSize[Conn], DeltaTick); m_SnapCrcErrors++; if(m_SnapCrcErrors > 10)