mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
ref: gl: cache worldmodel pointer instead of accessing it through gp_cl pointer
This commit is contained in:
@@ -249,6 +249,7 @@ typedef struct
|
||||
vec3_t modelorg; // relative to viewpoint
|
||||
|
||||
// get from engine
|
||||
model_t *worldmodel;
|
||||
world_static_t *world;
|
||||
cl_entity_t *entities;
|
||||
movevars_t *movevars;
|
||||
@@ -770,7 +771,7 @@ static inline int GL_MaxTextureUnits( void )
|
||||
return Q_min( glConfig.max_texture_units, MAX_TEXTURE_UNITS );
|
||||
}
|
||||
|
||||
#define WORLDMODEL (gp_cl->models[1])
|
||||
#define WORLDMODEL (tr.worldmodel)
|
||||
|
||||
//
|
||||
// renderer cvars
|
||||
|
||||
@@ -108,6 +108,8 @@ void R_NewMap( void )
|
||||
texture_t *tx;
|
||||
int i;
|
||||
|
||||
tr.worldmodel = gp_cl->models[1];
|
||||
|
||||
R_ClearDecals(); // clear all level decals
|
||||
|
||||
R_StudioResetPlayerModels();
|
||||
|
||||
Reference in New Issue
Block a user