mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Get SplitLinesByVertices up-to-date
This commit is contained in:
parent
2f407b585c
commit
bf7cc42166
1 changed files with 10 additions and 0 deletions
|
@ -2946,9 +2946,18 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
|
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
|
||||||
blockmap.AddVerticesSet(verts);
|
blockmap.AddVerticesSet(verts);
|
||||||
blockmap.AddLinedefsSet(lines);
|
blockmap.AddLinedefsSet(lines);
|
||||||
|
int bmWidth = blockmap.Size.Width;
|
||||||
|
int bmHeight = blockmap.Size.Height;
|
||||||
|
BlockEntry[,] bmap = blockmap.Map;
|
||||||
|
|
||||||
HashSet<Vertex> splitverts = new HashSet<Vertex>();
|
HashSet<Vertex> splitverts = new HashSet<Vertex>();
|
||||||
HashSet<Sector> changedsectors = (mergemode == MergeGeometryMode.REPLACE ? General.Map.Map.GetSectorsFromLinedefs(changedlines) : new HashSet<Sector>());
|
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)
|
foreach (Vertex v in verts)
|
||||||
{
|
{
|
||||||
|
@ -2990,6 +2999,7 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
Linedef nl = l.Split(v);
|
Linedef nl = l.Split(v);
|
||||||
if (nl == null) return false;
|
if (nl == null) return false;
|
||||||
v.Marked = true; //mxd
|
v.Marked = true; //mxd
|
||||||
|
splitverts.Add(v); //mxd
|
||||||
|
|
||||||
// Add the new line to the list
|
// Add the new line to the list
|
||||||
lines.Add(nl);
|
lines.Add(nl);
|
||||||
|
|
Loading…
Reference in a new issue