mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-01-31 05:00:34 +00:00
Fixed, map element dragging: in some cases sector properties copied from incorrect sectors were assigned to new sectors when using "Merge Dragged Geometry" mode.
This commit is contained in:
parent
ead65ebd93
commit
9d5abaf14f
1 changed files with 21 additions and 2 deletions
|
@ -2140,8 +2140,24 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Linedefs cache needs to be up to date...
|
||||
Update(true, false);
|
||||
|
||||
// Collect changed lines... We need those in by-vertex-index order
|
||||
// (otherwise SectorBuilder logic in some cases will incorrectly assign sector propertes)
|
||||
List<Vertex> markedverts = GetMarkedVertices(true);
|
||||
List<Linedef> changedlines = new List<Linedef>(markedverts.Count / 2);
|
||||
HashSet<Linedef> changedlineshash = new HashSet<Linedef>();
|
||||
foreach(Vertex v in markedverts)
|
||||
{
|
||||
foreach(Linedef l in v.Linedefs)
|
||||
{
|
||||
if(!changedlineshash.Contains(l))
|
||||
{
|
||||
changedlines.Add(l);
|
||||
changedlineshash.Add(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fix stuff...
|
||||
List<Linedef> changedlines = LinedefsFromMarkedVertices(false, true, true);
|
||||
CorrectSectorReferences(changedlines, true);
|
||||
CorrectOuterSides(new HashSet<Linedef>(changedlines));
|
||||
|
||||
|
@ -2354,7 +2370,10 @@ namespace CodeImp.DoomBuilder.Map
|
|||
foreach(Sector s in newsectors)
|
||||
{
|
||||
// Skip if sector already has properties
|
||||
if(s.CeilTexture != "-") continue;
|
||||
if(s.CeilTexture != "-" || s.FloorTexture != "-"
|
||||
|| s.FloorHeight != General.Settings.DefaultFloorHeight
|
||||
|| s.CeilHeight != General.Settings.DefaultCeilingHeight)
|
||||
continue;
|
||||
|
||||
// Copy from adjacent sector if any
|
||||
if(sector_copy != null)
|
||||
|
|
Loading…
Reference in a new issue