- fixed: line portal rendering PR was missing handling for portals with z offset.

Since it used the back sector's height directly the needed offsetting was not applied to the upper and lower texture.
This commit is contained in:
Christoph Oelckers 2021-03-05 17:17:44 +01:00
commit 8feba7dff9
3 changed files with 49 additions and 10 deletions

View file

@ -147,10 +147,16 @@ void HWDrawInfo::WorkerThread()
{
auto portal = seg->linedef->getPortal();
backsector = portal->mDestination->frontsector;
back = hw_FakeFlat(backsector, in_area, true);
if (front->floorplane.isSlope() || front->ceilingplane.isSlope() || back->floorplane.isSlope() || back->ceilingplane.isSlope())
{
// Having a one-sided portal like this with slopes is too messy so let's ignore that case.
back = nullptr;
}
}
if (backsector)
else if (backsector)
{
if (front->sectornum == backsector->sectornum || ((seg->sidedef->Flags & WALLF_POLYOBJ) && !seg->linedef->isVisualPortal()))
if (front->sectornum == backsector->sectornum || (seg->sidedef->Flags & WALLF_POLYOBJ))
{
back = front;
}