Create VBO vertex data before the level mesh since the mesh uses it to build geometry.

Draw all sectors as subsectors if lightmaps are enabled (even if a sector doesn't have a tile initially it could gain one)
This commit is contained in:
Magnus Norddahl 2025-05-15 23:53:34 +02:00
commit 51c6e8add6
6 changed files with 25 additions and 31 deletions

View file

@ -1716,9 +1716,6 @@ void DoomLevelMesh::SetSubsectorLightmap(int surfaceIndex)
int lightmapTileIndex = Mesh.Surfaces[surfaceIndex].LightmapTileIndex;
auto surface = &DoomSurfaceInfos[surfaceIndex];
if (surface->Subsector->firstline && surface->Subsector->firstline->sidedef)
surface->Subsector->firstline->sidedef->sector->HasLightmaps = true;
if (!surface->ControlSector)
{
int index = surface->Type == ST_CEILING ? 1 : 0;