Browse Source

engine: client: mod_dbghulls: reduce dependency on global loadmodel pointer

pull/2/head
Alibek Omarov 11 months ago
parent
commit
cff276db71
  1. 2
      engine/client/mod_dbghulls.c
  2. 2
      engine/common/mod_bmodel.c
  3. 2
      engine/common/mod_local.h

2
engine/client/mod_dbghulls.c

@ -659,7 +659,7 @@ static void make_hull_windings( hull_t *hull, hull_model_t *model )
Con_Reportf( "%i hull polys\n", model->num_polys ); Con_Reportf( "%i hull polys\n", model->num_polys );
} }
void Mod_InitDebugHulls( void ) void Mod_InitDebugHulls( model_t *loadmodel )
{ {
int i; int i;

2
engine/common/mod_bmodel.c

@ -2989,7 +2989,7 @@ qboolean Mod_LoadBmodelLumps( const byte *mod_base, qboolean isworld )
{ {
loadmodel = mod; // restore pointer to world loadmodel = mod; // restore pointer to world
#if !XASH_DEDICATED #if !XASH_DEDICATED
Mod_InitDebugHulls(); // 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
world.shadowdata = bmod->shadowdata_out; // occlusion data pointer world.shadowdata = bmod->shadowdata_out; // occlusion data pointer
#endif // XASH_DEDICATED #endif // XASH_DEDICATED

2
engine/common/mod_local.h

@ -164,7 +164,7 @@ void Mod_PrintWorldStats_f( void );
// //
// mod_dbghulls.c // mod_dbghulls.c
// //
void Mod_InitDebugHulls( void ); void Mod_InitDebugHulls( model_t *mod );
void Mod_CreatePolygonsForHull( int hullnum ); void Mod_CreatePolygonsForHull( int hullnum );
void Mod_ReleaseHullPolygons( void ); void Mod_ReleaseHullPolygons( void );

Loading…
Cancel
Save