]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - meshqueue.c
use dynamic eye position-centered bouncegrid when rendering in dynamic
[xonotic/darkplaces.git] / meshqueue.c
index f1d01edc54f13f2d95ebbdb15c213b073e9f8c85..a5510be722631f7b7d196e555dff081c8027ad1f 100644 (file)
@@ -22,7 +22,7 @@ int mqt_total;
 void R_MeshQueue_BeginScene(void)
 {
        mqt_count = 0;
-       mqt_viewplanedist = DotProduct(r_view.origin, r_view.forward);
+       mqt_viewplanedist = DotProduct(r_refdef.view.origin, r_refdef.view.forward);
        mqt_viewmaxdist = 0;
 }
 
@@ -46,7 +46,7 @@ void R_MeshQueue_AddTransparent(const vec3_t center, void (*callback)(const enti
        mq->ent = ent;
        mq->surfacenumber = surfacenumber;
        mq->rtlight = rtlight;
-       mq->dist = DotProduct(center, r_view.forward) - mqt_viewplanedist;
+       mq->dist = DotProduct(center, r_refdef.view.forward) - mqt_viewplanedist;
        mq->next = NULL;
        mqt_viewmaxdist = max(mqt_viewmaxdist, mq->dist);
 }
@@ -61,7 +61,7 @@ void R_MeshQueue_RenderTransparent(void)
        const rtlight_t *rtlight;
        void (*callback)(const entity_render_t *ent, const rtlight_t *rtlight, int numsurfaces, int *surfaceindices);
        meshqueue_t *mqt;
-       meshqueue_t *hash[4096], **hashpointer[4096];
+       static meshqueue_t *hash[4096], **hashpointer[4096];
        int batchsurfaceindex[256];
        if (!mqt_count)
                return;