engine: restored BShift maps support

This commit is contained in:
Alibek Omarov 2019-12-02 02:14:02 +03:00
parent 612e7560ae
commit 3da10f28c4
1 changed files with 10 additions and 1 deletions

View File

@ -162,7 +162,7 @@ typedef struct
typedef struct
{
const int lumpnumber;
int lumpnumber;
const size_t mincount;
const size_t maxcount;
const int entrysize;
@ -2780,6 +2780,15 @@ qboolean Mod_LoadBmodelLumps( const byte *mod_base, qboolean isworld )
if( isworld ) world.flags = 0; // clear world settings
bmod->isworld = isworld;
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], isworld ? (LUMP_SAVESTATS|LUMP_SILENT) : 0 );