mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed and show error message if the crc doesn't match on map load
This commit is contained in:
parent
8acd47e3b8
commit
c27a634089
|
@ -956,8 +956,9 @@ const char *CClient::LoadMap(const char *pName, const char *pFilename, unsigned
|
||||||
// get the crc of the map
|
// get the crc of the map
|
||||||
if(m_pMap->Crc() != WantedCrc)
|
if(m_pMap->Crc() != WantedCrc)
|
||||||
{
|
{
|
||||||
m_pMap->Unload();
|
|
||||||
str_format(aErrorMsg, sizeof(aErrorMsg), "map differs from the server. %08x != %08x", m_pMap->Crc(), WantedCrc);
|
str_format(aErrorMsg, sizeof(aErrorMsg), "map differs from the server. %08x != %08x", m_pMap->Crc(), WantedCrc);
|
||||||
|
m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client", aErrorMsg);
|
||||||
|
m_pMap->Unload();
|
||||||
return aErrorMsg;
|
return aErrorMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue