render: pass currententity down to R_RenderFace

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-10-22 11:14:17 +10:30
parent 08901a1d85
commit 4fe87926ef
3 changed files with 8 additions and 8 deletions

View File

@ -411,7 +411,7 @@ R_DrawSubmodelPolygons(model_t *pmodel, int clipflags)
r_currentkey = ((mleaf_t *)currententity->topnode)->key;
// FIXME: use bounding-box-based frustum clipping info?
R_RenderFace(psurf, clipflags);
R_RenderFace(currententity, psurf, clipflags);
}
}
}
@ -540,7 +540,7 @@ R_RecursiveWorldNode(mnode_t *node, int clipflags)
R_RenderPoly(surf, clipflags);
}
} else {
R_RenderFace(surf, clipflags);
R_RenderFace(currententity, surf, clipflags);
}
}
surf++;
@ -561,7 +561,7 @@ R_RecursiveWorldNode(mnode_t *node, int clipflags)
R_RenderPoly(surf, clipflags);
}
} else {
R_RenderFace(surf, clipflags);
R_RenderFace(currententity, surf, clipflags);
}
}
surf++;

View File

@ -359,7 +359,7 @@ R_RenderFace
================
*/
void
R_RenderFace(msurface_t *fa, int clipflags)
R_RenderFace(entity_t *e, msurface_t *fa, int clipflags)
{
int i, lindex;
unsigned mask;
@ -397,11 +397,11 @@ R_RenderFace(msurface_t *fa, int clipflags)
r_nearzi = 0;
r_nearzionly = false;
makeleftedge = makerightedge = false;
pedges = currententity->model->edges;
pedges = e->model->edges;
r_lastvertvalid = false;
for (i = 0; i < fa->numedges; i++) {
lindex = currententity->model->surfedges[fa->firstedge + i];
lindex = e->model->surfedges[fa->firstedge + i];
if (lindex > 0) {
r_pedge = &pedges[lindex];
@ -504,7 +504,7 @@ R_RenderFace(msurface_t *fa, int clipflags)
surface_p->flags = fa->flags;
surface_p->insubmodel = insubmodel;
surface_p->spanstate = 0;
surface_p->entity = currententity;
surface_p->entity = e;
surface_p->key = r_currentkey++;
surface_p->spans = NULL;

View File

@ -118,7 +118,7 @@ void R_DrawPolyList(void);
extern qboolean insubmodel;
void R_DrawSprite(void);
void R_RenderFace(msurface_t *fa, int clipflags);
void R_RenderFace(entity_t *e, msurface_t *fa, int clipflags);
void R_RenderPoly(msurface_t *fa, int clipflags);
void R_RenderBmodelFace(bedge_t *pedges, msurface_t *psurf);
void R_TransformPlane(mplane_t *p, float *normal, float *dist);