0
0
Fork 0
mirror of https://git.do.srb2.org/STJr/ZoneBuilder.git synced 2025-02-25 21:33:06 +00:00

Reverted some older changes to Linedef.Join(), which were made for older version of "enhanced" map element merging logic and in some cases were causing incorrect geometry to be created when using current merging logic.

This commit is contained in:
MaxED 2016-06-24 22:25:12 +00:00 committed by spherallic
parent 945553e527
commit 61d3a49dcc

View file

@ -1307,7 +1307,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.front != null) this.front.AddTexturesTo(other.back);
// Change sidedefs?
if(back != null && !JoinChangeSidedefs(other, true, back)) return false;
if(!JoinChangeSidedefs(other, true, back)) return false;
}
// Compare back sectors
else if((otherbs != null) && (otherbs == thisbs))
@ -1317,7 +1317,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.back != null) this.back.AddTexturesTo(other.front);
// Change sidedefs?
if(front != null && !JoinChangeSidedefs(other, false, front)) return false;
if(!JoinChangeSidedefs(other, false, front)) return false;
}
// Compare front and back
else if((otherfs != null) && (otherfs == thisbs))
@ -1327,7 +1327,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.back != null) this.back.AddTexturesTo(other.back);
// Change sidedefs?
if(front != null && !JoinChangeSidedefs(other, true, front)) return false;
if(!JoinChangeSidedefs(other, true, front)) return false;
}
// Compare back and front
else if((otherbs != null) && (otherbs == thisfs))
@ -1337,7 +1337,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.front != null) this.front.AddTexturesTo(other.front);
// Change sidedefs?
if(back != null && !JoinChangeSidedefs(other, false, back)) return false;
if(!JoinChangeSidedefs(other, false, back)) return false;
}
else
{
@ -1351,7 +1351,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.back != null) this.back.AddTexturesTo(other.front);
// Change sidedefs?
if(front != null && !JoinChangeSidedefs(other, false, front)) return false;
if(!JoinChangeSidedefs(other, false, front)) return false;
}
else
{
@ -1359,7 +1359,7 @@ namespace CodeImp.DoomBuilder.Map
if(this.front != null) this.front.AddTexturesTo(other.front);
// Change sidedefs?
if(back != null && !JoinChangeSidedefs(other, false, back)) return false;
if(!JoinChangeSidedefs(other, false, back)) return false;
}
}
// This line single sided?
@ -1394,50 +1394,22 @@ namespace CodeImp.DoomBuilder.Map
// This line with its back to the other?
if(this.start == other.end)
{
//mxd. Attach our front to other back?
if(otherbs == null)
{
// Copy textures
if(other.back != null) other.back.AddTexturesTo(this.front);
if(this.back != null) this.back.AddTexturesTo(other.front);
// Copy textures
if(other.back != null) other.back.AddTexturesTo(this.front);
if(this.back != null) this.back.AddTexturesTo(other.front);
// Change sidedefs (replace other back with our front)
if(front != null && !JoinChangeSidedefs(other, false, front)) return false;
}
//mxd. Attach our back to other front?
else if(otherfs == null)
{
// Copy textures
if(other.front != null) other.front.AddTexturesTo(this.back);
if(this.front != null) this.front.AddTexturesTo(other.back);
// Change sidedefs (replace other back with our front)
if(back != null && !JoinChangeSidedefs(other, true, back)) return false;
}
// Change sidedefs
if(!JoinChangeSidedefs(other, false, front)) return false;
}
// Both lines face the same way
else
{
//mxd. Attach our back to other back?
if(otherbs == null)
{
// Copy textures
if(other.back != null) other.back.AddTexturesTo(this.back);
if(this.front != null) this.front.AddTexturesTo(other.front);
// Copy textures
if(other.back != null) other.back.AddTexturesTo(this.back);
if(this.front != null) this.front.AddTexturesTo(other.front);
// Change sidedefs
if(back != null && !JoinChangeSidedefs(other, false, back)) return false;
}
//mxd. Attach our front to other front?
else if(otherfs == null)
{
// Copy textures
if(other.front != null) other.front.AddTexturesTo(this.front);
if(this.back != null) this.back.AddTexturesTo(other.back);
// Change sidedefs
if(front != null && !JoinChangeSidedefs(other, true, front)) return false;
}
// Change sidedefs
if(!JoinChangeSidedefs(other, false, back)) return false;
}
}
}