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

This commit is contained in:
Alibek Omarov 2023-10-28 15:35:20 +03:00
parent 30d1492b93
commit cff276db71
3 changed files with 3 additions and 3 deletions

View File

@ -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 );
}
void Mod_InitDebugHulls( void )
void Mod_InitDebugHulls( model_t *loadmodel )
{
int i;

View File

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

View File

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