Get SplitLinesByVertices up-to-date

This commit is contained in:
spherallic 2023-05-08 12:30:32 +02:00
parent 2f407b585c
commit bf7cc42166
1 changed files with 10 additions and 0 deletions

View File

@ -2946,9 +2946,18 @@ namespace CodeImp.DoomBuilder.Map
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
blockmap.AddVerticesSet(verts);
blockmap.AddLinedefsSet(lines);
int bmWidth = blockmap.Size.Width;
int bmHeight = blockmap.Size.Height;
BlockEntry[,] bmap = blockmap.Map;
HashSet<Vertex> splitverts = new HashSet<Vertex>();
HashSet<Sector> changedsectors = (mergemode == MergeGeometryMode.REPLACE ? General.Map.Map.GetSectorsFromLinedefs(changedlines) : new HashSet<Sector>());
HashSet<Vertex> lineverts = new HashSet<Vertex>();
foreach (Linedef l in lines)
{
lineverts.Add(l.Start);
lineverts.Add(l.End);
}
foreach (Vertex v in verts)
{
@ -2990,6 +2999,7 @@ namespace CodeImp.DoomBuilder.Map
Linedef nl = l.Split(v);
if (nl == null) return false;
v.Marked = true; //mxd
splitverts.Add(v); //mxd
// Add the new line to the list
lines.Add(nl);