mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
On second thought, previous fix should be applied more selectively.
This commit is contained in:
parent
a78c700225
commit
dc054f767b
1 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue