Skip to content

Commit

Permalink
- avoid infinite portal recursion.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 12, 2022
1 parent d388d19 commit 31d8a23
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rendering/hwrenderer/scene/hw_portal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,11 @@ void HWSectorStackPortal::SetupCoverage(HWDrawInfo *di)
bool HWSectorStackPortal::Setup(HWDrawInfo *di, FRenderState &rstate, Clipper *clipper)
{
auto state = mState;
if (state->renderdepth > 100) // energency abort in case a map manages to set up a recursion.
{
return false;
}

FSectorPortalGroup *portal = origin;
auto &vp = di->Viewpoint;

Expand Down

0 comments on commit 31d8a23

Please sign in to comment.