Fix regression with same-texture-selection in Visual Mode.

This commit is contained in:
sphere 2021-04-03 23:51:29 +02:00
parent 8b6406075c
commit f63047400d
1 changed files with 7 additions and 4 deletions

View File

@ -632,16 +632,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd
private void SelectNeighbourSideParts(Sidedef side, Rectangle sourcerect, bool select, bool matchtexture, bool matchheight, bool forward)
{
if (side.Line.Marked)
return;
BaseVisualSector s = (BaseVisualSector)mode.GetVisualSector(side.Sector);
if(s != null)
{
VisualSidedefParts parts = s.GetSidedefParts(side);
SelectNeighbourSidePart(parts.lower, sourcerect, select, matchtexture, matchheight, forward);
SelectNeighbourSidePart(parts.middlesingle, sourcerect, select, matchtexture, matchheight, forward);
SelectNeighbourSidePart(parts.middledouble, sourcerect, select, matchtexture, matchheight, forward);
SelectNeighbourSidePart(parts.upper, sourcerect, select, matchtexture, matchheight, forward);
if(parts.middle3d != null)
@ -649,6 +646,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(VisualMiddle3D middle3D in parts.middle3d)
SelectNeighbourSidePart(middle3D, sourcerect, select, matchtexture, matchheight, forward);
}
// hack to prevent midtexture selection wrapping arround
if (side.Line.Marked)
return;
SelectNeighbourSidePart(parts.middledouble, sourcerect, select, matchtexture, matchheight, forward);
}
}