mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 13:51:40 +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:
parent
9147c31234
commit
3c62e89ded
1 changed files with 16 additions and 44 deletions
|
@ -1126,7 +1126,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))
|
||||
|
@ -1136,7 +1136,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))
|
||||
|
@ -1146,7 +1146,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))
|
||||
|
@ -1156,7 +1156,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
|
||||
{
|
||||
|
@ -1170,7 +1170,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
|
||||
{
|
||||
|
@ -1178,7 +1178,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?
|
||||
|
@ -1213,50 +1213,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue