diff --git a/src/hwrenderer/scene/hw_bsp.cpp b/src/hwrenderer/scene/hw_bsp.cpp index affca42a85..075a93d8f3 100644 --- a/src/hwrenderer/scene/hw_bsp.cpp +++ b/src/hwrenderer/scene/hw_bsp.cpp @@ -702,20 +702,6 @@ void HWDrawInfo::DoSubsector(subsector_t * sub) ss_renderflags[sub->Index()] = (sub->numlines > 2) ? SSRF_PROCESSED|SSRF_RENDERALL : SSRF_PROCESSED; if (sub->hacked & 1) AddHackedSubsector(sub); - - FSectorPortalGroup *portal; - - portal = fakesector->GetPortalGroup(sector_t::ceiling); - if (portal != nullptr) - { - AddSubsectorToPortal(portal, sub); - } - - portal = fakesector->GetPortalGroup(sector_t::floor); - if (portal != nullptr) - { - AddSubsectorToPortal(portal, sub); - } } } } diff --git a/src/hwrenderer/scene/hw_drawinfo.cpp b/src/hwrenderer/scene/hw_drawinfo.cpp index 2dc9aef04a..40bdb8a7a2 100644 --- a/src/hwrenderer/scene/hw_drawinfo.cpp +++ b/src/hwrenderer/scene/hw_drawinfo.cpp @@ -187,8 +187,8 @@ void HWDrawInfo::ClearBuffers() MissingUpperSegs.Clear(); MissingLowerSegs.Clear(); SubsectorHacks.Clear(); - CeilingStacks.Clear(); - FloorStacks.Clear(); + //CeilingStacks.Clear(); + //FloorStacks.Clear(); HandledSubsectors.Clear(); spriteindex = 0; diff --git a/src/hwrenderer/scene/hw_drawinfo.h b/src/hwrenderer/scene/hw_drawinfo.h index 58951473b2..33074b0fd4 100644 --- a/src/hwrenderer/scene/hw_drawinfo.h +++ b/src/hwrenderer/scene/hw_drawinfo.h @@ -167,8 +167,8 @@ struct HWDrawInfo TMap floodFloorSegs; TMap floodCeilingSegs; - TArray CeilingStacks; - TArray FloorStacks; + //TArray CeilingStacks; + //TArray FloorStacks; TArray HandledSubsectors; @@ -300,7 +300,6 @@ public: void DrawPlayerSprites(bool hudModelStep, FRenderState &state); void ProcessLowerMinisegs(TArray &lowersegs); - void AddSubsectorToPortal(FSectorPortalGroup *portal, subsector_t *sub); void AddWall(GLWall *w); void AddMirrorSurface(GLWall *w); diff --git a/src/hwrenderer/scene/hw_renderhacks.cpp b/src/hwrenderer/scene/hw_renderhacks.cpp index 82610c7926..1558b4bba4 100644 --- a/src/hwrenderer/scene/hw_renderhacks.cpp +++ b/src/hwrenderer/scene/hw_renderhacks.cpp @@ -1180,6 +1180,11 @@ void HWDrawInfo::HandleHackedSubsectors() SubsectorHacks.Clear(); } +// This code was meant to fix the portal in KDIZD's Z1M1, but later versions of that mod do not need it anymore. +// I am not aware of other portals ever having been set up so badly as this one so it probably is not needed anymore. +// Even if needed this must be done differently because this code depends on hacking the render data in a bad way. +#if 0 + //========================================================================== // // This merges visplanes that lie inside a sector stack together @@ -1406,3 +1411,4 @@ void HWDrawInfo::AddSubsectorToPortal(FSectorPortalGroup *ptg, subsector_t *sub) ptl->AddSubsector(sub); } +#endif