mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- Don't add 3D floor dummy draw segments to the list
This commit is contained in:
parent
e19c8eba62
commit
efb1a8d113
6 changed files with 28 additions and 32 deletions
|
@ -319,9 +319,15 @@ namespace swrenderer
|
|||
side_t *sidedef = mLineSegment->sidedef;
|
||||
|
||||
RenderPortal *renderportal = Thread->Portal.get();
|
||||
Clip3DFloors *clip3d = Thread->Clip3D.get();
|
||||
|
||||
DrawSegment *draw_segment = Thread->FrameMemory->NewObject<DrawSegment>();
|
||||
Thread->DrawSegments->Push(draw_segment);
|
||||
|
||||
// 3D floors code abuses the line render code to update plane clipping
|
||||
// lists but doesn't actually draw anything.
|
||||
bool onlyUpdatePlaneClip = (clip3d->fake3D & FAKE3D_FAKEMASK) ? true : false;
|
||||
if (!onlyUpdatePlaneClip)
|
||||
Thread->DrawSegments->Push(draw_segment);
|
||||
|
||||
draw_segment->CurrentPortalUniq = renderportal->CurrentPortalUniq;
|
||||
draw_segment->sx1 = WallC.sx1;
|
||||
|
@ -342,10 +348,6 @@ namespace swrenderer
|
|||
draw_segment->bFakeBoundary = false;
|
||||
draw_segment->foggy = foggy;
|
||||
|
||||
Clip3DFloors *clip3d = Thread->Clip3D.get();
|
||||
if (clip3d->fake3D & FAKE3D_FAKEMASK) draw_segment->fake = 1;
|
||||
else draw_segment->fake = 0;
|
||||
|
||||
draw_segment->sprtopclip = nullptr;
|
||||
draw_segment->sprbottomclip = nullptr;
|
||||
draw_segment->maskedtexturecol = nullptr;
|
||||
|
@ -406,26 +408,29 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
if (!draw_segment->fake && r_3dfloors && mBackSector->e && mBackSector->e->XFloor.ffloors.Size()) {
|
||||
for (i = 0; i < (int)mBackSector->e->XFloor.ffloors.Size(); i++) {
|
||||
F3DFloor *rover = mBackSector->e->XFloor.ffloors[i];
|
||||
if (rover->flags & FF_RENDERSIDES && (!(rover->flags & FF_INVERTSIDES) || rover->flags & FF_ALLSIDES)) {
|
||||
draw_segment->bFakeBoundary |= 1;
|
||||
break;
|
||||
if (!onlyUpdatePlaneClip && r_3dfloors)
|
||||
{
|
||||
if (mBackSector->e && mBackSector->e->XFloor.ffloors.Size()) {
|
||||
for (i = 0; i < (int)mBackSector->e->XFloor.ffloors.Size(); i++) {
|
||||
F3DFloor *rover = mBackSector->e->XFloor.ffloors[i];
|
||||
if (rover->flags & FF_RENDERSIDES && (!(rover->flags & FF_INVERTSIDES) || rover->flags & FF_ALLSIDES)) {
|
||||
draw_segment->bFakeBoundary |= 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mFrontSector->e && mFrontSector->e->XFloor.ffloors.Size()) {
|
||||
for (i = 0; i < (int)mFrontSector->e->XFloor.ffloors.Size(); i++) {
|
||||
F3DFloor *rover = mFrontSector->e->XFloor.ffloors[i];
|
||||
if (rover->flags & FF_RENDERSIDES && (rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) {
|
||||
draw_segment->bFakeBoundary |= 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!draw_segment->fake && r_3dfloors && mFrontSector->e && mFrontSector->e->XFloor.ffloors.Size()) {
|
||||
for (i = 0; i < (int)mFrontSector->e->XFloor.ffloors.Size(); i++) {
|
||||
F3DFloor *rover = mFrontSector->e->XFloor.ffloors[i];
|
||||
if (rover->flags & FF_RENDERSIDES && (rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) {
|
||||
draw_segment->bFakeBoundary |= 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// kg3D - no for fakes
|
||||
if (!draw_segment->fake)
|
||||
|
||||
if (!onlyUpdatePlaneClip)
|
||||
// allocate space for masked texture tables, if needed
|
||||
// [RH] Don't just allocate the space; fill it in too.
|
||||
if ((TexMan(sidedef->GetTexture(side_t::mid), true)->UseType != FTexture::TEX_Null || draw_segment->bFakeBoundary || IsFogBoundary(mFrontSector, mBackSector)) &&
|
||||
|
@ -508,7 +513,7 @@ namespace swrenderer
|
|||
draw_segment->shade = LightVisibility::LightLevelToShade(mLineSegment->sidedef->GetLightLevel(foggy, mLineSegment->frontsector->lightlevel) + LightVisibility::ActualExtraLight(foggy, Thread->Viewport.get()), foggy);
|
||||
}
|
||||
|
||||
if ((draw_segment->bFogBoundary || draw_segment->maskedtexturecol != nullptr) && !draw_segment->fake)
|
||||
if (draw_segment->bFogBoundary || draw_segment->maskedtexturecol != nullptr)
|
||||
{
|
||||
Thread->DrawSegments->PushTranslucent(draw_segment);
|
||||
}
|
||||
|
|
|
@ -217,7 +217,6 @@ namespace swrenderer
|
|||
draw_segment->swall = nullptr;
|
||||
draw_segment->bFogBoundary = false;
|
||||
draw_segment->curline = nullptr;
|
||||
draw_segment->fake = 0;
|
||||
draw_segment->foggy = false;
|
||||
memcpy(draw_segment->sprbottomclip, floorclip + pl->left, (pl->right - pl->left) * sizeof(short));
|
||||
memcpy(draw_segment->sprtopclip, ceilingclip + pl->left, (pl->right - pl->left) * sizeof(short));
|
||||
|
|
|
@ -161,8 +161,6 @@ namespace swrenderer
|
|||
// [ZZ] the same as above
|
||||
if (ds->CurrentPortalUniq != renderportal->CurrentPortalUniq)
|
||||
continue;
|
||||
// kg3D - no fake segs
|
||||
if (ds->fake) continue;
|
||||
if (ds->maskedtexturecol != nullptr || ds->bFogBoundary)
|
||||
{
|
||||
RenderDrawSegment renderer(Thread);
|
||||
|
|
|
@ -131,9 +131,6 @@ namespace swrenderer
|
|||
{
|
||||
ds = Segment(groupIndex);
|
||||
|
||||
// kg3D - no clipping on fake segs
|
||||
if (ds->fake) continue;
|
||||
|
||||
if (ds->silhouette & SIL_BOTTOM)
|
||||
{
|
||||
short *clip1 = clipbottom + ds->x1;
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace swrenderer
|
|||
|
||||
FWallTmapVals tmapvals;
|
||||
|
||||
int fake; // ident fake drawseg, don't draw and clip sprites backups
|
||||
int CurrentPortalUniq; // [ZZ] to identify the portal that this drawseg is in. used for sprite clipping.
|
||||
};
|
||||
|
||||
|
|
|
@ -365,8 +365,6 @@ namespace swrenderer
|
|||
{
|
||||
DrawSegment *ds = segmentlist->Segment(index);
|
||||
|
||||
// kg3D - no clipping on fake segs
|
||||
if (ds->fake) continue;
|
||||
// determine if the drawseg obscures the sprite
|
||||
if (ds->x1 >= x2 || ds->x2 <= x1 ||
|
||||
(!(ds->silhouette & SIL_BOTH) && ds->maskedtexturecol == nullptr &&
|
||||
|
|
Loading…
Reference in a new issue