Replaced another IsX360() with #ifdef

This commit is contained in:
Saul Rennison 2013-07-05 15:35:40 +01:00
parent 9fcd93a955
commit b7913266d6

View file

@ -1407,18 +1407,17 @@ NavErrorType CNavMesh::Load( void )
}
}
if ( IsX360() )
#ifdef _XBOX
// 360 has compressed NAVs
CLZMA lzma;
if ( lzma.IsCompressed( (unsigned char *)fileBuffer.Base() ) )
{
// 360 has compressed NAVs
CLZMA lzma;
if ( lzma.IsCompressed( (unsigned char *)fileBuffer.Base() ) )
{
int originalSize = lzma.GetActualSize( (unsigned char *)fileBuffer.Base() );
unsigned char *pOriginalData = new unsigned char[originalSize];
lzma.Uncompress( (unsigned char *)fileBuffer.Base(), pOriginalData );
fileBuffer.AssumeMemory( pOriginalData, originalSize, originalSize, CUtlBuffer::READ_ONLY );
}
int originalSize = lzma.GetActualSize( (unsigned char *)fileBuffer.Base() );
unsigned char *pOriginalData = new unsigned char[originalSize];
lzma.Uncompress( (unsigned char *)fileBuffer.Base(), pOriginalData );
fileBuffer.AssumeMemory( pOriginalData, originalSize, originalSize, CUtlBuffer::READ_ONLY );
}
#endif
// check magic number
unsigned int magic = fileBuffer.GetUnsignedInt();