mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-25 21:31:14 +00:00
Filter non-marked linedefs by edited area when accepting Edit Selection mode
This commit is contained in:
parent
863af3290e
commit
1d65205a6b
1 changed files with 10 additions and 5 deletions
|
@ -1806,13 +1806,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
Sector vsector = null;
|
||||
General.Settings.FindDefaultDrawSettings();
|
||||
|
||||
// Go for all sidedes in the new geometry
|
||||
List<Sidedef> newsides = General.Map.Map.GetMarkedSidedefs(true);
|
||||
List<Linedef> oldlines = General.Map.Map.GetMarkedLinedefs(false); //mxd
|
||||
// Go for all sidedefs in the new geometry
|
||||
HashSet<Sidedef> newsides = new HashSet<Sidedef>(General.Map.Map.GetMarkedSidedefs(true));
|
||||
HashSet<Linedef> oldlines = new HashSet<Linedef>(General.Map.Map.GetMarkedLinedefs(false));
|
||||
|
||||
// Determine area in which we are editing
|
||||
RectangleF editarea = MapSet.CreateArea(General.Map.Map.GetMarkedLinedefs(true));
|
||||
editarea = MapSet.IncreaseArea(editarea, General.Map.Map.GetMarkedVertices(true));
|
||||
editarea.Inflate(1.0f, 1.0f);
|
||||
oldlines = MapSet.FilterByArea(oldlines, ref editarea);
|
||||
|
||||
//mxd. Let's use a blockmap...
|
||||
RectangleF area = MapSet.CreateArea(oldlines);
|
||||
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area);
|
||||
BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(editarea);
|
||||
blockmap.AddLinedefsSet(oldlines);
|
||||
|
||||
foreach(Sidedef s in newsides)
|
||||
|
|
Loading…
Reference in a new issue