mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Split polyobj plane drawnode-creating code from ds->maskedtexturecol code, and add plane bounds checking
This commit is contained in:
parent
b66925e467
commit
ff0b1d1dfa
1 changed files with 17 additions and 13 deletions
|
@ -1699,21 +1699,25 @@ static void R_CreateDrawNodes(void)
|
||||||
entry->ffloor = ds->thicksides[i];
|
entry->ffloor = ds->thicksides[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef POLYOBJECTS_PLANES
|
||||||
|
// Check for a polyobject plane, but only if this is a front line
|
||||||
|
if (ds->curline->polyseg && ds->curline->polyseg->visplane && !ds->curline->side) {
|
||||||
|
plane = ds->curline->polyseg->visplane;
|
||||||
|
R_PlaneBounds(plane);
|
||||||
|
|
||||||
|
if (plane->low < con_clipviewtop || plane->high > vid.height || plane->high > plane->low)
|
||||||
|
;
|
||||||
|
else {
|
||||||
|
// Put it in!
|
||||||
|
entry = R_CreateDrawNode(&nodehead);
|
||||||
|
entry->plane = plane;
|
||||||
|
entry->seg = ds;
|
||||||
|
}
|
||||||
|
ds->curline->polyseg->visplane = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (ds->maskedtexturecol)
|
if (ds->maskedtexturecol)
|
||||||
{
|
{
|
||||||
#ifdef POLYOBJECTS_PLANES
|
|
||||||
// Check for a polyobject plane, but only if this is a front line
|
|
||||||
if (ds->curline->polyseg && ds->curline->polyseg->visplane && !ds->curline->side) {
|
|
||||||
// Put it in!
|
|
||||||
|
|
||||||
entry = R_CreateDrawNode(&nodehead);
|
|
||||||
entry->plane = ds->curline->polyseg->visplane;
|
|
||||||
entry->seg = ds;
|
|
||||||
ds->curline->polyseg->visplane->polyobj = ds->curline->polyseg;
|
|
||||||
ds->curline->polyseg->visplane = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
entry = R_CreateDrawNode(&nodehead);
|
entry = R_CreateDrawNode(&nodehead);
|
||||||
entry->seg = ds;
|
entry->seg = ds;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue