engine: expose world BSP version through world global structure

This commit is contained in:
Alibek Omarov 2023-12-15 07:37:40 +03:00
parent f6fecce52b
commit 46c61660cf
3 changed files with 4 additions and 0 deletions

View File

@ -2998,6 +2998,7 @@ static qboolean Mod_LoadBmodelLumps( model_t *mod, const byte *mod_base, qboolea
if( isworld )
{
world.version = bmod->version;
#if !XASH_DEDICATED
Mod_InitDebugHulls( mod ); // FIXME: build hulls for separate bmodels (shells, medkits etc)
world.deluxedata = bmod->deluxedata_out; // deluxemap data pointer

View File

@ -113,6 +113,8 @@ typedef struct world_static_s
// tree visualization stuff
int recursion_level;
int max_recursion;
uint32_t version; // BSP version
} world_static_t;
#ifndef REF_DLL

View File

@ -111,6 +111,7 @@ void Mod_FreeModel( model_t *mod )
if( mod->type == mod_brush && FBitSet( mod->flags, MODEL_WORLD ) )
{
world.version = 0;
world.shadowdata = NULL;
world.deluxedata = NULL;
}