render: pass currententity down to R_DrawSolidClippedSubmodelPolygons

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-10-22 11:44:21 +10:30
parent b3ff3f8098
commit e828ea33e1
3 changed files with 4 additions and 4 deletions

View File

@ -312,7 +312,7 @@ R_DrawSolidClippedSubmodelPolygons
================
*/
void
R_DrawSolidClippedSubmodelPolygons(model_t *pmodel)
R_DrawSolidClippedSubmodelPolygons(entity_t *e, model_t *pmodel)
{
int i, j, lindex;
vec_t dot;
@ -372,7 +372,7 @@ R_DrawSolidClippedSubmodelPolygons(model_t *pmodel)
}
pbedge[j - 1].pnext = NULL; // mark end of edges
R_RecursiveClipBPoly(currententity, pbedge, currententity->topnode, psurf);
R_RecursiveClipBPoly(e, pbedge, e->topnode, psurf);
} else {
Sys_Error("no edges in bmodel");
}

View File

@ -869,7 +869,7 @@ R_DrawBEntitiesOnList(void)
if (r_pefragtopnode->contents >= 0) {
// not a leaf; has to be clipped to the world BSP
r_clipflags = clipflags;
R_DrawSolidClippedSubmodelPolygons(clmodel);
R_DrawSolidClippedSubmodelPolygons(e, clmodel);
} else {
// falls entirely in one leaf, so we just put all
// the edges in the edge list and let 1/z sorting

View File

@ -141,7 +141,7 @@ void R_GenSkyTile16(void *pdest);
void R_Surf8Patch(void);
void R_Surf16Patch(void);
void R_DrawSubmodelPolygons(model_t *pmodel, int clipflags);
void R_DrawSolidClippedSubmodelPolygons(model_t *pmodel);
void R_DrawSolidClippedSubmodelPolygons(entity_t *e, model_t *pmodel);
void R_AddPolygonEdges(emitpoint_t *pverts, int numverts, int miplevel);
surf_t *R_GetSurf(void);