mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: restore lumps after swapping them for blue shift maps
Mod_TestBmodelLumps may modify srclumps data, which is essential for brush model loader. BlueShift maps have swapped lumps for some reason Restoring them to default is fix for now
This commit is contained in:
parent
23e2f4d0cc
commit
0963e05716
@ -2908,13 +2908,28 @@ 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 )
|
||||
if( header->version == HLBSP_VERSION )
|
||||
{
|
||||
// blue-shift swapped lumps
|
||||
srclumps[0].lumpnumber = LUMP_PLANES;
|
||||
srclumps[1].lumpnumber = LUMP_ENTITIES;
|
||||
// only relevant for half-life maps
|
||||
if( 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;
|
||||
}
|
||||
else
|
||||
{
|
||||
// everything else
|
||||
srclumps[0].lumpnumber = LUMP_ENTITIES;
|
||||
srclumps[1].lumpnumber = LUMP_PLANES;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// everything else
|
||||
srclumps[0].lumpnumber = LUMP_ENTITIES;
|
||||
srclumps[1].lumpnumber = LUMP_PLANES;
|
||||
}
|
||||
|
||||
// loading base lumps
|
||||
|
Loading…
x
Reference in New Issue
Block a user