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;
}
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);
}
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;