mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Fix the missing world on map reload.
If the map got reloaded but the current leaf didn't change the world (and most entities) didn't get drawn. Forcing a vis update by first setting r_viewleaf to null and marking surfaces does the trick :)
This commit is contained in:
parent
462a9047c6
commit
8f869c001b
5 changed files with 15 additions and 0 deletions
|
@ -192,7 +192,10 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
for (i = 0; i < r_worldentity.model->numleafs; i++)
|
||||
r_worldentity.model->leafs[i].efrags = NULL;
|
||||
|
||||
// Force a vis update
|
||||
r_viewleaf = NULL;
|
||||
R_MarkLeaves ();
|
||||
|
||||
R_ClearParticles ();
|
||||
|
||||
GL_BuildLightmaps (models, num_models);
|
||||
|
|
|
@ -274,6 +274,10 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
memset (&r_worldentity, 0, sizeof (r_worldentity));
|
||||
r_worldentity.model = worldmodel;
|
||||
|
||||
// Force a vis update
|
||||
r_viewleaf = NULL;
|
||||
R_MarkLeaves ();
|
||||
|
||||
R_FreeAllEntities ();
|
||||
R_ClearParticles ();
|
||||
R_RegisterTextures (models, num_models);
|
||||
|
|
|
@ -63,6 +63,8 @@ R_MarkLeaves (void)
|
|||
|
||||
r_visframecount++;
|
||||
r_oldviewleaf = r_viewleaf;
|
||||
if (!r_viewleaf)
|
||||
return;
|
||||
|
||||
if (r_novis->int_val) {
|
||||
r_oldviewleaf = 0; // so vis will be recalcualted when novis gets
|
||||
|
|
|
@ -199,7 +199,10 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
if (worldmodel->skytexture)
|
||||
R_InitSky (worldmodel->skytexture);
|
||||
|
||||
// Force a vis update
|
||||
r_viewleaf = NULL;
|
||||
R_MarkLeaves ();
|
||||
|
||||
R_ClearParticles ();
|
||||
|
||||
r_cnumsurfs = r_maxsurfs->int_val;
|
||||
|
|
|
@ -227,7 +227,10 @@ R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
|||
if (worldmodel->skytexture)
|
||||
R_InitSky (worldmodel->skytexture);
|
||||
|
||||
// Force a vis update
|
||||
r_viewleaf = NULL;
|
||||
R_MarkLeaves ();
|
||||
|
||||
R_ClearParticles ();
|
||||
|
||||
r_cnumsurfs = r_maxsurfs->int_val;
|
||||
|
|
Loading…
Reference in a new issue