- fixed the overlapping sector handler in hw_fakeflat.cpp.

this picked the wrong plane as the proper texture cutoff.
This commit is contained in:
Christoph Oelckers 2023-09-16 22:17:09 +02:00
parent f7c379b720
commit 5f11fd051b

View file

@ -224,9 +224,9 @@ sector_t * hw_FakeFlat(sector_t * sec, area_t in_area, bool back, sector_t *loca
if (fakesectorbuffer && fakesectorbuffer[sec->sectornum]) return fakesectorbuffer[sec->sectornum];
auto dest = localcopy? localcopy : allocateSector(sec);
*dest = *sec;
dest->ceilingplane = sec->floorplane;
dest->ceilingplane.FlipVert();
dest->planes[sector_t::ceiling].TexZ = dest->planes[sector_t::floor].TexZ;
dest->floorplane = sec->ceilingplane;
dest->floorplane.FlipVert();
dest->planes[sector_t::floor].TexZ = dest->planes[sector_t::ceiling].TexZ;
dest->ClearPortal(sector_t::ceiling);
dest->ClearPortal(sector_t::floor);
return dest;