On second thought, previous fix should be applied more selectively.

This commit is contained in:
MaxED 2016-07-07 11:20:28 +00:00 committed by spherallic
parent a78c700225
commit dc054f767b

View file

@ -1035,11 +1035,26 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This flips all linedefs in the selection (used for mirroring)
private void FlipLinedefs()
{
//mxd. Check if we need to flip sidedefs
bool flipsides = false;
HashSet<Linedef> selectedlineshash = new HashSet<Linedef>(selectedlines);
foreach(Vertex v in selectedvertices)
{
foreach(Linedef l in v.Linedefs)
{
if(!selectedlineshash.Contains(l))
{
flipsides = true;
break;
}
}
}
// Flip linedefs
foreach(Linedef ld in selectedlines)
{
ld.FlipVertices();
ld.FlipSidedefs(); //mxd
if(flipsides) ld.FlipSidedefs(); //mxd
}
// Done