]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug with VIEWCACHEDYNAMIC
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Nov 2009 10:44:33 +0000 (10:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Nov 2009 10:44:33 +0000 (10:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9473 d7cf8633-e32d-0410-b094-e92efae38249

client.h
gl_rsurf.c

index 9425321450fa02048f5cb003c5463c8a02e7ebf2..26e69bf2857e0cc4eac53e0eda5793b75036a50a 100644 (file)
--- a/client.h
+++ b/client.h
@@ -1553,6 +1553,7 @@ typedef struct r_refdef_view_s
 }
 r_refdef_view_t;
 
+#define VIEWCACHEDYNAMIC 1
 typedef struct r_refdef_viewcache_s
 {
 #ifdef VIEWCACHEDYNAMIC
index 3ba46ac84f83ad5a350034a68259e91fc2cca248..12c2fd7fb22852d941720d9ca92f4087893fca89 100644 (file)
@@ -433,7 +433,7 @@ void R_View_WorldVisibility(qboolean forcenovis)
        viewleaf = model->brush.PointInLeaf ? model->brush.PointInLeaf(model, r_refdef.view.origin) : NULL;
        // if possible fetch the visible cluster bits
        if (!r_lockpvs.integer && model->brush.FatPVS)
-               model->brush.FatPVS(model, r_refdef.view.origin, 2, r_refdef.viewcache.world_pvsbits, sizeof(r_refdef.viewcache.world_pvsbits), false);
+               model->brush.FatPVS(model, r_refdef.view.origin, 2, r_refdef.viewcache.world_pvsbits, (r_refdef.viewcache.world_numclusters+7)>>3, false);
 
        if (!r_lockvisibility.integer)
        {