render: pass currententity down to R_ZDrawSubmodelPolys

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-10-22 11:31:58 +10:30
parent 8af4338acf
commit dd796af5e4
3 changed files with 4 additions and 4 deletions

View File

@ -805,7 +805,7 @@ R_ZDrawSubmodelPolys
================
*/
void
R_ZDrawSubmodelPolys(model_t *pmodel)
R_ZDrawSubmodelPolys(entity_t *e, model_t *pmodel)
{
int i, numsurfaces;
msurface_t *psurf;
@ -825,7 +825,7 @@ R_ZDrawSubmodelPolys(model_t *pmodel)
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON))) {
// FIXME: use bounding-box-based frustum clipping info?
R_RenderPoly(currententity, psurf, 15);
R_RenderPoly(e, psurf, 15);
}
}
}

View File

@ -852,7 +852,7 @@ R_DrawBEntitiesOnList(void)
// on at this point, so no clipping to the world tree is
// needed, just frustum clipping
if (r_drawpolys | r_drawculledpolys) {
R_ZDrawSubmodelPolys(clmodel);
R_ZDrawSubmodelPolys(e, clmodel);
} else {
r_pefragtopnode = NULL;

View File

@ -192,7 +192,7 @@ typedef struct btofpoly_s {
extern int numbtofpolys;
extern btofpoly_t *pbtofpolys;
void R_ZDrawSubmodelPolys(model_t *clmodel);
void R_ZDrawSubmodelPolys(entity_t *e, model_t *clmodel);
//=========================================================
// Alias models