mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2024-11-27 14:22:08 +00:00
Replaced another IsX360() with #ifdef
This commit is contained in:
parent
9fcd93a955
commit
b7913266d6
1 changed files with 9 additions and 10 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue