mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-02-25 21:32:12 +00:00
Replaced IsX360() with #ifdef
Fixes compile for non-Valve-compiled `tier1` library (LZMA is missing).
This commit is contained in:
parent
7b82d5ca27
commit
9fcd93a955
1 changed files with 9 additions and 10 deletions
|
@ -1315,18 +1315,17 @@ const CUtlVector< Place > *CNavMesh::GetPlacesFromNavFile( bool *hasUnnamedPlace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IsX360() )
|
#ifdef _XBOX
|
||||||
|
// 360 has compressed NAVs
|
||||||
|
CLZMA lzma;
|
||||||
|
if ( lzma.IsCompressed( (unsigned char *)fileBuffer.Base() ) )
|
||||||
{
|
{
|
||||||
// 360 has compressed NAVs
|
int originalSize = lzma.GetActualSize( (unsigned char *)fileBuffer.Base() );
|
||||||
CLZMA lzma;
|
unsigned char *pOriginalData = new unsigned char[originalSize];
|
||||||
if ( lzma.IsCompressed( (unsigned char *)fileBuffer.Base() ) )
|
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
|
// check magic number
|
||||||
unsigned int magic = fileBuffer.GetUnsignedInt();
|
unsigned int magic = fileBuffer.GetUnsignedInt();
|
||||||
|
|
Loading…
Reference in a new issue