Browse Source

engine: expose world BSP version through world global structure

pull/2/head
Alibek Omarov 11 months ago
parent
commit
46c61660cf
  1. 1
      engine/common/mod_bmodel.c
  2. 2
      engine/common/mod_local.h
  3. 1
      engine/common/model.c

1
engine/common/mod_bmodel.c

@ -2998,6 +2998,7 @@ static qboolean Mod_LoadBmodelLumps( model_t *mod, const byte *mod_base, qboolea @@ -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

2
engine/common/mod_local.h

@ -113,6 +113,8 @@ typedef struct world_static_s @@ -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

1
engine/common/model.c

@ -111,6 +111,7 @@ void Mod_FreeModel( model_t *mod ) @@ -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;
}

Loading…
Cancel
Save