mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
removed debug messages
This commit is contained in:
parent
e96f1995b2
commit
1ea6100a3b
|
@ -82,16 +82,10 @@ bool CMapChecker::ReadAndValidateMap(IStorage *pStorage, const char *pFilename,
|
|||
{
|
||||
if(str_comp(pCurrent->m_aMapName, aMapName) == 0)
|
||||
{
|
||||
dbg_msg("DEBUG", "CHECKING MAP: %s", aMapName);
|
||||
char aBuffer[512]; // TODO: MAX_PATH_LENGTH (512) should be defined in a more central header and not in storage.cpp and editor.h
|
||||
bool CrcSizeMatch = false;
|
||||
if(!pStorage->FindFile(aMapNameExt, "maps", StorageType, aBuffer, sizeof(aBuffer), pCurrent->m_MapCrc, pCurrent->m_MapSize, &CrcSizeMatch))
|
||||
{
|
||||
dbg_msg("DEBUG", "FindFile returned false");
|
||||
return true;
|
||||
}
|
||||
|
||||
dbg_msg("DEBUG", "FindFile returned true, CrcSizeMatch: %s", CrcSizeMatch ? "y" : "n");
|
||||
|
||||
// output filename
|
||||
if(pBuffer != 0 && BufferSize > 0)
|
||||
|
|
|
@ -341,30 +341,27 @@ public:
|
|||
if(Data->pBuffer[0])
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
else if(!str_comp(pName, Data->pFilename))
|
||||
{
|
||||
if(!str_comp(pName, Data->pFilename))
|
||||
// found the file
|
||||
str_format(Data->pBuffer, Data->BufferSize, "%s/%s", Data->pPath, Data->pFilename);
|
||||
|
||||
// check crc and size
|
||||
if(Data->pCrcSizeMatch != 0)
|
||||
{
|
||||
// found the file
|
||||
str_format(Data->pBuffer, Data->BufferSize, "%s/%s", Data->pPath, Data->pFilename);
|
||||
|
||||
// check crc and size
|
||||
if(Data->pCrcSizeMatch != 0)
|
||||
unsigned Crc = 0;
|
||||
unsigned Size = 0;
|
||||
if(!Data->pStorage->GetCrcSize(Data->pBuffer, Type, &Crc, &Size) || Crc != Data->WantedCrc || Size != Data->WantedSize)
|
||||
{
|
||||
unsigned Crc = 0;
|
||||
unsigned Size = 0;
|
||||
if(!Data->pStorage->GetCrcSize(Data->pBuffer, Type, &Crc, &Size) || Crc != Data->WantedCrc || Size != Data->WantedSize)
|
||||
{
|
||||
*Data->pCrcSizeMatch = false;
|
||||
Data->pBuffer[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
*Data->pCrcSizeMatch = true;
|
||||
*Data->pCrcSizeMatch = false;
|
||||
Data->pBuffer[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
else
|
||||
*Data->pCrcSizeMatch = true;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue