mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
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.
This commit is contained in:
parent
a8219530b1
commit
1f0467b545
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <base/hash.h>
|
#include <base/hash.h>
|
||||||
#include <base/hash_ctxt.h>
|
#include <base/hash_ctxt.h>
|
||||||
|
#include <base/log.h>
|
||||||
#include <base/logger.h>
|
#include <base/logger.h>
|
||||||
#include <base/math.h>
|
#include <base/math.h>
|
||||||
#include <base/system.h>
|
#include <base/system.h>
|
||||||
|
@ -1947,13 +1948,8 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
|
||||||
|
|
||||||
if(Msg != NETMSG_SNAPEMPTY && pTmpBuffer3->Crc() != Crc)
|
if(Msg != NETMSG_SNAPEMPTY && pTmpBuffer3->Crc() != Crc)
|
||||||
{
|
{
|
||||||
if(g_Config.m_Debug)
|
log_error("client", "snapshot crc error #%d - tick=%d wantedcrc=%d gotcrc=%d compressed_size=%d delta_tick=%d",
|
||||||
{
|
|
||||||
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_SnapCrcErrors, GameTick, Crc, pTmpBuffer3->Crc(), m_aSnapshotIncomingDataSize[Conn], DeltaTick);
|
||||||
m_pConsole->Print(IConsole::OUTPUT_LEVEL_DEBUG, "client", aBuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_SnapCrcErrors++;
|
m_SnapCrcErrors++;
|
||||||
if(m_SnapCrcErrors > 10)
|
if(m_SnapCrcErrors > 10)
|
||||||
|
|
Loading…
Reference in a new issue