X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=meshqueue.c;h=a5510be722631f7b7d196e555dff081c8027ad1f;hb=f88c6ba82547fa34ab5ddd4febc0b49700820907;hp=f1d01edc54f13f2d95ebbdb15c213b073e9f8c85;hpb=544356c7bb6288760533142b8ab402f4d8d966ef;p=xonotic%2Fdarkplaces.git diff --git a/meshqueue.c b/meshqueue.c index f1d01edc..a5510be7 100644 --- a/meshqueue.c +++ b/meshqueue.c @@ -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;