Fix floors not being updated

This commit is contained in:
RaveYard 2023-09-09 19:49:40 +02:00 committed by Christoph Oelckers
parent f0b1739b2d
commit 8e3b29de33

View file

@ -507,11 +507,14 @@ void HWFlat::ProcessSector(HWDrawInfo *di, FRenderState& state, sector_t * front
const auto* lm = &sector->Level->levelMesh->Surfaces[0]; // temporay hack on top of a temporary hack
for (auto& subsector : section->subsectors)
for (int i = 0, count = sector->subsectorcount; i < count; ++i)
{
if (auto lightmap = subsector->lightmap[ceiling ? 1 : 0][0])
for (int plane = 0; plane < 2; ++plane)
{
state.PushVisibleSurface(lightmap - lm, lightmap);
if (auto lightmap = sector->subsectors[i]->lightmap[plane][0])
{
state.PushVisibleSurface(lightmap - lm, lightmap);
}
}
}