- invalidate plane meshes when the sector is retriangulated.

After this any old mesh has become invalid and needs to be rebuilt.
This commit is contained in:
Christoph Oelckers 2021-12-15 12:17:56 +01:00
parent 37e49ed775
commit d8a3035bcc

View file

@ -42,7 +42,6 @@
#include "earcut.hpp" #include "earcut.hpp"
#include "hw_sections2.h" #include "hw_sections2.h"
#include "tesselator.h" #include "tesselator.h"
#include "nodebuilder/nodebuild.h"
SectorGeometry sectorGeometry; SectorGeometry sectorGeometry;
SectionGeometry sectionGeometry; SectionGeometry sectionGeometry;
@ -498,7 +497,10 @@ bool SectionGeometry::CreateMesh(Section* section)
} }
#endif #endif
sdata.planes[0].vertices.Clear();
sdata.planes[1].vertices.Clear();
section->dirty &= ~EDirty::GeometryDirty; section->dirty &= ~EDirty::GeometryDirty;
section->dirty |= EDirty::FloorDirty | EDirty::CeilingDirty;
return true; return true;
} }