Browse Source

engine: restored BShift maps support

pull/2/head
Alibek Omarov 5 years ago
parent
commit
3da10f28c4
  1. 11
      engine/common/mod_bmodel.c

11
engine/common/mod_bmodel.c

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

Loading…
Cancel
Save