mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
ref_gl: remove Mod_SetCurrentLoadingModel call
This commit is contained in:
parent
2c17af4850
commit
25235b5296
@ -3449,13 +3449,12 @@ void R_MarkLeaves( void )
|
||||
GL_CreateSurfaceLightmap
|
||||
========================
|
||||
*/
|
||||
void GL_CreateSurfaceLightmap( msurface_t *surf )
|
||||
void GL_CreateSurfaceLightmap( msurface_t *surf, model_t *loadmodel )
|
||||
{
|
||||
int smax, tmax;
|
||||
int sample_size;
|
||||
mextrasurf_t *info = surf->info;
|
||||
byte *base;
|
||||
model_t *loadmodel = gEngfuncs.Mod_GetCurrentLoadingModel();
|
||||
|
||||
if( !loadmodel->lightdata )
|
||||
return;
|
||||
@ -3527,10 +3526,8 @@ void GL_RebuildLightmaps( void )
|
||||
if( m->name[0] == '*' || m->type != mod_brush )
|
||||
continue;
|
||||
|
||||
gEngfuncs.Mod_SetCurrentLoadingModel( m );
|
||||
|
||||
for( j = 0; j < m->numsurfaces; j++ )
|
||||
GL_CreateSurfaceLightmap( m->surfaces + j );
|
||||
GL_CreateSurfaceLightmap( m->surfaces + j, m );
|
||||
}
|
||||
LM_UploadBlock( false );
|
||||
|
||||
@ -3598,9 +3595,8 @@ void GL_BuildLightmaps( void )
|
||||
// clearing all decal chains
|
||||
m->surfaces[j].pdecals = NULL;
|
||||
m->surfaces[j].visframe = 0;
|
||||
gEngfuncs.Mod_SetCurrentLoadingModel( m );
|
||||
|
||||
GL_CreateSurfaceLightmap( m->surfaces + j );
|
||||
GL_CreateSurfaceLightmap( m->surfaces + j, m );
|
||||
|
||||
if( m->surfaces[j].flags & SURF_DRAWTURB )
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user