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
if( isworld ) if( isworld )
{ {
world.version = bmod->version;
#if !XASH_DEDICATED #if !XASH_DEDICATED
Mod_InitDebugHulls( mod ); // FIXME: build hulls for separate bmodels (shells, medkits etc) Mod_InitDebugHulls( mod ); // FIXME: build hulls for separate bmodels (shells, medkits etc)
world.deluxedata = bmod->deluxedata_out; // deluxemap data pointer world.deluxedata = bmod->deluxedata_out; // deluxemap data pointer

2
engine/common/mod_local.h

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

1
engine/common/model.c

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

Loading…
Cancel
Save