mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-14 13:10:09 +01:00
ref_soft: Do not clip submodels with negative topnode content (fix crash on some maps)
This commit is contained in:
parent
3617e8e7a1
commit
c36f415793
@ -1248,6 +1248,8 @@ extern int r_leafkeys[MAX_MAP_LEAFS];
|
|||||||
//
|
//
|
||||||
void R_RotateBmodel (void);
|
void R_RotateBmodel (void);
|
||||||
void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel, mnode_t *topnode);
|
void R_DrawSolidClippedSubmodelPolygons (model_t *pmodel, mnode_t *topnode);
|
||||||
|
void R_DrawSubmodelPolygons (model_t *pmodel, int clipflags, mnode_t *topnode);
|
||||||
|
|
||||||
//
|
//
|
||||||
// r_blitscreen.c
|
// r_blitscreen.c
|
||||||
//
|
//
|
||||||
|
6
r_main.c
6
r_main.c
@ -1326,13 +1326,13 @@ void R_DrawBEntitiesOnList (void)
|
|||||||
// RI.currententity = tr.draw_list->solid_entities[i];
|
// RI.currententity = tr.draw_list->solid_entities[i];
|
||||||
RI.currententity->topnode = topnode;
|
RI.currententity->topnode = topnode;
|
||||||
//ASSERT( RI.currentmodel == tr.draw_list->solid_entities[i]->model );
|
//ASSERT( RI.currentmodel == tr.draw_list->solid_entities[i]->model );
|
||||||
//if (topnode->contents >= 0)
|
if (topnode->contents >= 0)
|
||||||
{
|
{
|
||||||
// not a leaf; has to be clipped to the world BSP
|
// not a leaf; has to be clipped to the world BSP
|
||||||
r_clipflags = clipflags;
|
r_clipflags = clipflags;
|
||||||
R_DrawSolidClippedSubmodelPolygons (RI.currentmodel, topnode);
|
R_DrawSolidClippedSubmodelPolygons (RI.currentmodel, topnode);
|
||||||
}
|
}
|
||||||
//else
|
else
|
||||||
{
|
{
|
||||||
// falls entirely in one leaf, so we just put all the
|
// falls entirely in one leaf, so we just put all the
|
||||||
// edges in the edge list and let 1/z sorting handle
|
// edges in the edge list and let 1/z sorting handle
|
||||||
@ -1340,7 +1340,7 @@ void R_DrawBEntitiesOnList (void)
|
|||||||
//ASSERT( RI.currentmodel == tr.draw_list->solid_entities[i]->model );
|
//ASSERT( RI.currentmodel == tr.draw_list->solid_entities[i]->model );
|
||||||
|
|
||||||
|
|
||||||
//R_DrawSubmodelPolygons (RI.currentmodel, clipflags, topnode);
|
R_DrawSubmodelPolygons (RI.currentmodel, clipflags, topnode);
|
||||||
}
|
}
|
||||||
RI.currententity->topnode = NULL;
|
RI.currententity->topnode = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user