diff --git a/source/core/rendering/hw_entrypoint.cpp b/source/core/rendering/hw_entrypoint.cpp index 26fa96575..976e819fe 100644 --- a/source/core/rendering/hw_entrypoint.cpp +++ b/source/core/rendering/hw_entrypoint.cpp @@ -164,7 +164,9 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float screen->PostProcessScene(false, CM_DEFAULT, flash, []() { hw_int_useindexedcolortextures = false; + PostProcess.Unclock(); Draw2D(&twodpsp, *screen->RenderState()); // draws the weapon sprites + PostProcess.Clock(); }); PostProcess.Unclock(); } diff --git a/source/core/rendering/scene/hw_bunchdrawer.cpp b/source/core/rendering/scene/hw_bunchdrawer.cpp index 0dbaae0f2..d8e14fd62 100644 --- a/source/core/rendering/scene/hw_bunchdrawer.cpp +++ b/source/core/rendering/scene/hw_bunchdrawer.cpp @@ -350,7 +350,6 @@ void BunchDrawer::ProcessBunch(int bnch) HWWall hwwall; hwwall.Process(di, &wall[ww], §or[bunch->sectornum], wall[ww].nextsector < 0 ? nullptr : §or[wall[ww].nextsector]); - rendered_lines++; SetupWall.Unclock(); Bsp.Clock(); @@ -665,11 +664,12 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal) bool inbunch; - SetupSprite.Clock(); int sectnum = sections[sectionnum].sector; if (!gotsector[sectnum]) { + Bsp.Unclock(); + SetupSprite.Clock(); gotsector.Set(sectnum); CoreSectIterator it(sectnum); while (auto actor = it.Next()) @@ -691,15 +691,18 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal) } } SetupSprite.Unclock(); + Bsp.Clock(); } if (automapping) show2dsector.Set(sectnum); + Bsp.Unclock(); SetupFlat.Clock(); HWFlat flat; flat.ProcessSector(di, §or[sectnum], sectionnum); SetupFlat.Unclock(); + Bsp.Clock(); //Todo: process subsectors inbunch = false; diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 7fc409288..99b27cc9c 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -397,6 +397,7 @@ void HWWall::SetupLights(HWDrawInfo *di, FDynLightData &lightdata) //========================================================================== void HWWall::PutWall(HWDrawInfo *di, bool translucent) { + rendered_lines++; if (translucent || (texture && texture->GetTranslucency() && type == RENDERWALL_M2S)) { flags |= HWF_TRANSLUCENT;