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 9425321..26e69bf 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 3ba46ac..12c2fd7 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)
        {