mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: correctly validate blueshift maps
This commit is contained in:
parent
154dd5c9ae
commit
dd1daa5bff
@ -1977,7 +1977,7 @@ static void Mod_LoadTextures( dbspmodel_t *bmod )
|
||||
int size = (int)sizeof( mip_t ) + ((mt->width * mt->height * 85)>>6);
|
||||
int next_dataofs, remaining;
|
||||
|
||||
// compute next dataofset to determine allocated miptex sapce
|
||||
// compute next dataofset to determine allocated miptex space
|
||||
for( j = i + 1; j < loadmodel->numtextures; j++ )
|
||||
{
|
||||
next_dataofs = in->dataofs[j];
|
||||
@ -2893,6 +2893,15 @@ qboolean Mod_TestBmodelLumps( const char *name, const byte *mod_base, qboolean s
|
||||
break;
|
||||
}
|
||||
|
||||
if( header->version == HLBSP_VERSION &&
|
||||
header->lumps[LUMP_ENTITIES].fileofs <= 1024 &&
|
||||
(header->lumps[LUMP_ENTITIES].filelen % sizeof( dplane_t )) == 0 )
|
||||
{
|
||||
// blue-shift swapped lumps
|
||||
srclumps[0].lumpnumber = LUMP_PLANES;
|
||||
srclumps[1].lumpnumber = LUMP_ENTITIES;
|
||||
}
|
||||
|
||||
// loading base lumps
|
||||
for( i = 0; i < ARRAYSIZE( srclumps ); i++ )
|
||||
Mod_LoadLump( mod_base, &srclumps[i], &worldstats[i], flags );
|
||||
|
Loading…
x
Reference in New Issue
Block a user