Make r_novis 0 take effect immediately.

This commit is contained in:
Bill Currie 2012-01-03 23:17:49 +09:00
parent 0797183201
commit 454047ab92
5 changed files with 5 additions and 5 deletions

View file

@ -320,7 +320,7 @@ extern int r_maxsurfsseen, r_maxedgesseen, r_cnumsurfs;
extern qboolean r_surfsonstack;
extern qboolean r_dowarpold, r_viewchanged;
extern mleaf_t *r_viewleaf, *r_oldviewleaf;
extern mleaf_t *r_viewleaf;
extern int r_clipflags;
extern int r_dlightframecount;

View file

@ -401,7 +401,6 @@ R_SetupFrame (void)
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
// current viewleaf
r_oldviewleaf = r_viewleaf;
r_viewleaf = Mod_PointInLeaf (r_origin, r_worldentity.model);
V_SetContentsColor (r_viewleaf->contents);

View file

@ -43,7 +43,8 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
#include "r_local.h"
#include "r_shared.h"
mleaf_t *r_viewleaf, *r_oldviewleaf;
mleaf_t *r_viewleaf;
static mleaf_t *r_oldviewleaf;
void
R_MarkLeaves (void)
@ -63,6 +64,8 @@ R_MarkLeaves (void)
r_oldviewleaf = r_viewleaf;
if (r_novis->int_val) {
r_oldviewleaf = 0; // so vis will be recalcualted when novis gets
// turned off
vis = solid;
memset (solid, 0xff, (r_worldentity.model->numleafs + 7) >> 3);
} else

View file

@ -266,7 +266,6 @@ R_SetupFrame (void)
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
// current viewleaf
r_oldviewleaf = r_viewleaf;
r_viewleaf = Mod_PointInLeaf (r_origin, r_worldentity.model);
r_dowarpold = r_dowarp;

View file

@ -262,7 +262,6 @@ R_SetupFrame (void)
AngleVectors (r_refdef.viewangles, vpn, vright, vup);
// current viewleaf
r_oldviewleaf = r_viewleaf;
r_viewleaf = Mod_PointInLeaf (r_origin, r_worldentity.model);
r_dowarpold = r_dowarp;