mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-23 19:01:06 +00:00
Register the textures of other brush models;
This commit is contained in:
parent
962451e2fe
commit
b2aa5ce554
1 changed files with 23 additions and 1 deletions
|
@ -186,6 +186,22 @@ R_Init (void)
|
|||
Fog_Init ();
|
||||
}
|
||||
|
||||
static void
|
||||
register_textures (model_t *model)
|
||||
{
|
||||
int i;
|
||||
texture_t *tex;
|
||||
|
||||
for (i = 0; i < model->numtextures; i++) {
|
||||
tex = model->textures[i];
|
||||
if (!tex)
|
||||
continue;
|
||||
if (tex->texturechain_tail)
|
||||
continue;
|
||||
R_AddTexture (tex);
|
||||
}
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
|
@ -223,7 +239,13 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
}
|
||||
if (!strncmp (tex->name, "window02_1", 10))
|
||||
mirrortexturenum = i;
|
||||
R_AddTexture (tex);
|
||||
}
|
||||
register_textures (r_worldentity.model);
|
||||
for (i = 0; i < num_models; i++) {
|
||||
if (!models[i])
|
||||
continue;
|
||||
if (models[i] != r_worldentity.model && models[i]->type == mod_brush)
|
||||
register_textures (models[i]);
|
||||
}
|
||||
tex = r_notexture_mip;
|
||||
tex->texturechain = NULL;
|
||||
|
|
Loading…
Reference in a new issue