mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
Changed, Visual mode: "Auto-align textures" and "Paste Textures Floodfill" actions now use visual mode geometry to determine whether a sidedef part should be processed. This fixes inability to apply said actions to sidedef parts only visible because of slopes.
Fixed, Visual mode: both "With same texture" and "With same height" Select modifiers are now checked when both of them are used at once (previously a sidedef part/floor/ceiling was selected when any of those matched).
This commit is contained in:
parent
5d5e8cec29
commit
b67ecc63ce
8 changed files with 163 additions and 59 deletions
|
@ -46,7 +46,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
public string newtexlow;
|
||||
}
|
||||
|
||||
private struct SidedefFillJob
|
||||
public struct SidedefFillJob
|
||||
{
|
||||
public Sidedef sidedef;
|
||||
|
||||
|
|
|
@ -692,5 +692,106 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Texture Floodfill
|
||||
|
||||
// This performs texture floodfill along all walls that match with the same texture
|
||||
// NOTE: This method uses the sidedefs marking to indicate which sides have been filled
|
||||
// When resetsidemarks is set to true, all sidedefs will first be marked false (not aligned).
|
||||
// Setting resetsidemarks to false is usefull to fill only within a specific selection
|
||||
// (set the marked property to true for the sidedefs outside the selection)
|
||||
public static void FloodfillTextures(BaseVisualMode mode, Sidedef start, HashSet<long> originaltextures, string filltexture, bool resetsidemarks)
|
||||
{
|
||||
Stack<Tools.SidedefFillJob> todo = new Stack<Tools.SidedefFillJob>(50);
|
||||
|
||||
// Mark all sidedefs false (they will be marked true when the texture is aligned)
|
||||
if(resetsidemarks) General.Map.Map.ClearMarkedSidedefs(false);
|
||||
|
||||
// Begin with first sidedef
|
||||
if(SidedefTextureMatch(mode, start, originaltextures))
|
||||
todo.Push(new Tools.SidedefFillJob { sidedef = start, forward = true });
|
||||
|
||||
// Continue until nothing more to align
|
||||
while(todo.Count > 0)
|
||||
{
|
||||
// Get the align job to do
|
||||
Tools.SidedefFillJob j = todo.Pop();
|
||||
|
||||
//mxd. Get visual parts
|
||||
if(mode.VisualSectorExists(j.sidedef.Sector))
|
||||
{
|
||||
VisualSidedefParts parts = ((BaseVisualSector)mode.GetVisualSector(j.sidedef.Sector)).GetSidedefParts(j.sidedef);
|
||||
|
||||
// Apply texturing
|
||||
if((parts.upper != null && parts.upper.Triangles > 0) && originaltextures.Contains(j.sidedef.LongHighTexture))
|
||||
j.sidedef.SetTextureHigh(filltexture);
|
||||
if(((parts.middledouble != null && parts.middledouble.Triangles > 0) || (parts.middlesingle != null && parts.middlesingle.Triangles > 0)) && originaltextures.Contains(j.sidedef.LongMiddleTexture))
|
||||
j.sidedef.SetTextureMid(filltexture);
|
||||
if((parts.lower != null && parts.lower.Triangles > 0) && originaltextures.Contains(j.sidedef.LongLowTexture))
|
||||
j.sidedef.SetTextureLow(filltexture);
|
||||
}
|
||||
|
||||
j.sidedef.Marked = true;
|
||||
|
||||
if(j.forward)
|
||||
{
|
||||
// Add sidedefs forward (connected to the right vertex)
|
||||
Vertex v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start;
|
||||
AddSidedefsForFloodfill(mode, todo, v, true, originaltextures);
|
||||
|
||||
// Add sidedefs backward (connected to the left vertex)
|
||||
v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End;
|
||||
AddSidedefsForFloodfill(mode, todo, v, false, originaltextures);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add sidedefs backward (connected to the left vertex)
|
||||
Vertex v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End;
|
||||
AddSidedefsForFloodfill(mode, todo, v, false, originaltextures);
|
||||
|
||||
// Add sidedefs forward (connected to the right vertex)
|
||||
v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start;
|
||||
AddSidedefsForFloodfill(mode, todo, v, true, originaltextures);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This adds the matching, unmarked sidedefs from a vertex for texture alignment
|
||||
private static void AddSidedefsForFloodfill(BaseVisualMode mode, Stack<Tools.SidedefFillJob> stack, Vertex v, bool forward, HashSet<long> texturelongnames)
|
||||
{
|
||||
foreach(Linedef ld in v.Linedefs)
|
||||
{
|
||||
Sidedef side1 = (forward ? ld.Front : ld.Back);
|
||||
Sidedef side2 = (forward ? ld.Back : ld.Front);
|
||||
if((ld.Start == v) && (side1 != null) && !side1.Marked)
|
||||
{
|
||||
if(SidedefTextureMatch(mode, side1, texturelongnames))
|
||||
stack.Push(new Tools.SidedefFillJob { forward = forward, sidedef = side1 });
|
||||
}
|
||||
else if((ld.End == v) && (side2 != null) && !side2.Marked)
|
||||
{
|
||||
if(SidedefTextureMatch(mode, side2, texturelongnames))
|
||||
stack.Push(new Tools.SidedefFillJob { forward = forward, sidedef = side2 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Texture Alignment
|
||||
|
||||
//mxd. This checks if any of the sidedef texture match the given textures
|
||||
public static bool SidedefTextureMatch(BaseVisualMode mode, Sidedef sd, HashSet<long> texturelongnames)
|
||||
{
|
||||
if(!mode.VisualSectorExists(sd.Sector)) return false;
|
||||
VisualSidedefParts parts = ((BaseVisualSector)mode.GetVisualSector(sd.Sector)).GetSidedefParts(sd);
|
||||
|
||||
return (texturelongnames.Contains(sd.LongHighTexture) && (parts.upper != null && parts.upper.Triangles > 0)) ||
|
||||
(texturelongnames.Contains(sd.LongLowTexture) && (parts.lower != null && parts.lower.Triangles > 0)) ||
|
||||
(texturelongnames.Contains(sd.LongMiddleTexture)
|
||||
&& ((parts.middledouble != null && parts.middledouble.Triangles > 0) || (parts.middlesingle != null && parts.middlesingle.Triangles > 0)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -597,20 +597,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
Rectangle r = BuilderModesTools.GetSidedefPartSize(visualside);
|
||||
if(r.Width == 0 || r.Height == 0) return;
|
||||
if((matchtexture && visualside.Texture == Texture && r.IntersectsWith(sourcerect)) ||
|
||||
(matchheight && sourcerect.Height == r.Height && sourcerect.Y == r.Y))
|
||||
if((!matchtexture || (visualside.Texture == Texture && r.IntersectsWith(sourcerect))) &&
|
||||
(!matchheight || (sourcerect.Height == r.Height && sourcerect.Y == r.Y)))
|
||||
{
|
||||
visualside.SelectNeighbours(select, matchtexture, matchheight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//mxd
|
||||
public virtual bool IsSelected()
|
||||
{
|
||||
return selected;
|
||||
}
|
||||
|
||||
//mxd
|
||||
protected void FitTexture(FitTextureOptions options)
|
||||
{
|
||||
|
@ -1022,7 +1016,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
// Do the alignment
|
||||
Tools.FloodfillTextures(Sidedef, texturehashes, newtexture, false);
|
||||
BuilderModesTools.FloodfillTextures(mode, Sidedef, texturehashes, newtexture, false);
|
||||
|
||||
// Get the changed sidedefs
|
||||
List<Sidedef> changes = General.Map.Map.GetMarkedSidedefs(true);
|
||||
|
|
|
@ -618,7 +618,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
foreach(IVisualEventReceiver obj in selectedobjects)
|
||||
{
|
||||
if(!obj.IsSelected()) continue;
|
||||
if(!obj.Selected) continue;
|
||||
|
||||
if(obj is BaseVisualThing) numThings++;
|
||||
else if(obj is BaseVisualVertex) numVerts++;
|
||||
|
@ -1922,7 +1922,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
if(General.Interface.AltState)
|
||||
{
|
||||
target.SelectNeighbours(target.IsSelected(), General.Interface.ShiftState, General.Interface.CtrlState);
|
||||
target.SelectNeighbours(target.Selected, General.Interface.ShiftState, General.Interface.CtrlState);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1930,7 +1930,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
selectedobjects.CopyTo(selection);
|
||||
|
||||
foreach(IVisualEventReceiver obj in selection)
|
||||
obj.SelectNeighbours(target.IsSelected(), General.Interface.ShiftState, General.Interface.CtrlState);
|
||||
obj.SelectNeighbours(target.Selected, General.Interface.ShiftState, General.Interface.CtrlState);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3711,7 +3711,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Wrap the value within the width of the texture (to prevent ridiculous values)
|
||||
// NOTE: We don't use ScaledWidth here because the texture offset is in pixels, not mappixels
|
||||
if(texture.IsImageLoaded && Tools.SidedefTextureMatch(j.sidedef, texturehashes))
|
||||
if(texture.IsImageLoaded && BuilderModesTools.SidedefTextureMatch(this, j.sidedef, texturehashes))
|
||||
{
|
||||
if(alignx) j.sidedef.OffsetX %= texture.Width;
|
||||
if(aligny) j.sidedef.OffsetY %= texture.Height;
|
||||
|
@ -3737,7 +3737,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
// Wrap the value within the width of the texture (to prevent ridiculous values)
|
||||
// NOTE: We don't use ScaledWidth here because the texture offset is in pixels, not mappixels
|
||||
if(texture.IsImageLoaded && Tools.SidedefTextureMatch(j.sidedef, texturehashes))
|
||||
if(texture.IsImageLoaded && BuilderModesTools.SidedefTextureMatch(this, j.sidedef, texturehashes))
|
||||
{
|
||||
if(alignx) j.sidedef.OffsetX %= texture.Width;
|
||||
if(aligny) j.sidedef.OffsetY %= texture.Height;
|
||||
|
@ -3760,7 +3760,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// When resetsidemarks is set to true, all sidedefs will first be marked false (not aligned).
|
||||
// Setting resetsidemarks to false is usefull to align only within a specific selection
|
||||
// (set the marked property to true for the sidedefs outside the selection)
|
||||
private void AutoAlignTexturesUDMF(BaseVisualGeometrySidedef start, ImageData texture, bool alignx, bool aligny, bool resetsidemarks, bool checkSelectedSidedefParts)
|
||||
private void AutoAlignTexturesUDMF(BaseVisualGeometrySidedef start, ImageData texture, bool alignx, bool aligny, bool resetsidemarks, bool checkselectedsidedefparts)
|
||||
{
|
||||
// Mark all sidedefs false (they will be marked true when the texture is aligned)
|
||||
if(resetsidemarks) General.Map.Map.ClearMarkedSidedefs(false);
|
||||
|
@ -3770,14 +3770,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
float scalex = (General.Map.Config.ScaledTextureOffsets && !texture.WorldPanning) ? texture.Scale.x : 1.0f;
|
||||
float scaley = (General.Map.Config.ScaledTextureOffsets && !texture.WorldPanning) ? texture.Scale.y : 1.0f;
|
||||
|
||||
SidedefAlignJob first = new SidedefAlignJob();
|
||||
first.sidedef = start.Sidedef;
|
||||
first.offsetx = start.Sidedef.OffsetX;
|
||||
|
||||
if(start.GeometryType == VisualGeometryType.WALL_MIDDLE_3D)
|
||||
first.controlSide = start.GetControlLinedef().Front;
|
||||
else
|
||||
first.controlSide = start.Sidedef;
|
||||
SidedefAlignJob first = new SidedefAlignJob { sidedef = start.Sidedef, offsetx = start.Sidedef.OffsetX };
|
||||
first.controlSide = (start.GeometryType == VisualGeometryType.WALL_MIDDLE_3D ? start.GetControlLinedef().Front : start.Sidedef);
|
||||
|
||||
//mxd. We potentially need to deal with 2 textures (because of long and short texture names)...
|
||||
HashSet<long> texturehashes = new HashSet<long> { texture.LongName };
|
||||
|
@ -3799,7 +3793,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
//mxd
|
||||
List<BaseVisualGeometrySidedef> selectedVisualSides = new List<BaseVisualGeometrySidedef>();
|
||||
if(checkSelectedSidedefParts && !singleselection)
|
||||
if(checkselectedsidedefparts && !singleselection)
|
||||
{
|
||||
foreach(IVisualEventReceiver i in selectedobjects)
|
||||
{
|
||||
|
@ -3871,23 +3865,34 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
while(todo.Count > 0)
|
||||
{
|
||||
Vertex v;
|
||||
float forwardoffset;
|
||||
float backwardoffset;
|
||||
float forwardoffset, backwardoffset;
|
||||
bool matchtop = false;
|
||||
bool matchmid = false;
|
||||
bool matchbottom = false;
|
||||
|
||||
// Get the align job to do
|
||||
SidedefAlignJob j = todo.Pop();
|
||||
|
||||
bool matchtop = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongHighTexture)) && j.sidedef.HighRequired());
|
||||
bool matchbottom = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongLowTexture)) && j.sidedef.LowRequired());
|
||||
bool matchmid = ((!singleselection || texturehashes.Contains(j.controlSide.LongMiddleTexture)) && (j.controlSide.MiddleRequired() || j.controlSide.LongMiddleTexture != MapSet.EmptyLongName)); //mxd
|
||||
|
||||
//mxd. If there's a selection, check if matched part is actually selected
|
||||
if(checkSelectedSidedefParts && !singleselection)
|
||||
//mxd. Get visual parts
|
||||
if(VisualSectorExists(j.sidedef.Sector))
|
||||
{
|
||||
if(matchtop) matchtop = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_UPPER);
|
||||
if(matchbottom) matchbottom = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_LOWER);
|
||||
if(matchmid) matchmid = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE) ||
|
||||
SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE_3D);
|
||||
VisualSidedefParts parts = ((BaseVisualSector)GetVisualSector(j.sidedef.Sector)).GetSidedefParts(j.sidedef);
|
||||
VisualSidedefParts controlparts = (j.sidedef != j.controlSide ? ((BaseVisualSector)GetVisualSector(j.controlSide.Sector)).GetSidedefParts(j.controlSide) : parts);
|
||||
|
||||
matchtop = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongHighTexture)) && (parts.upper != null && parts.upper.Triangles > 0));
|
||||
matchbottom = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongLowTexture)) && (parts.lower != null && parts.lower.Triangles > 0));
|
||||
matchmid = ((!singleselection || texturehashes.Contains(j.controlSide.LongMiddleTexture))
|
||||
&& ((controlparts.middledouble != null && controlparts.middledouble.Triangles > 0) || (controlparts.middlesingle != null && controlparts.middlesingle.Triangles > 0))); //mxd
|
||||
|
||||
//mxd. If there's a selection, check if matched part is actually selected
|
||||
if(checkselectedsidedefparts && !singleselection)
|
||||
{
|
||||
if(matchtop) matchtop = parts.upper.Selected;
|
||||
if(matchbottom) matchbottom = parts.lower.Selected;
|
||||
if(matchmid) matchmid = ((parts.middledouble != null && parts.middledouble.Selected)
|
||||
|| (parts.middlesingle != null && parts.middlesingle.Selected)
|
||||
|| SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE_3D));
|
||||
}
|
||||
}
|
||||
|
||||
if(!matchbottom && !matchtop && !matchmid) continue; //mxd
|
||||
|
@ -4129,7 +4134,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
foreach(Sidedef s in controlSides)
|
||||
{
|
||||
if(!singleselection || Tools.SidedefTextureMatch(s, texturelongnames))
|
||||
if(!singleselection || BuilderModesTools.SidedefTextureMatch(this, s, texturelongnames))
|
||||
{
|
||||
SidedefAlignJob nj = new SidedefAlignJob();
|
||||
nj.forward = forward;
|
||||
|
@ -4147,7 +4152,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
foreach(Sidedef s in controlSides)
|
||||
{
|
||||
if(!singleselection || Tools.SidedefTextureMatch(s, texturelongnames))
|
||||
if(!singleselection || BuilderModesTools.SidedefTextureMatch(this, s, texturelongnames))
|
||||
{
|
||||
SidedefAlignJob nj = new SidedefAlignJob();
|
||||
nj.forward = forward;
|
||||
|
|
|
@ -24,6 +24,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
internal interface IVisualEventReceiver
|
||||
{
|
||||
//mxd. Properties
|
||||
bool Selected { get; }
|
||||
|
||||
// The events that must be handled
|
||||
void OnSelectBegin();
|
||||
void OnSelectEnd();
|
||||
|
@ -60,6 +63,5 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Other methods
|
||||
string GetTextureName();
|
||||
void SelectNeighbours(bool select, bool matchtexture, bool matchheight); //mxd
|
||||
bool IsSelected(); //mxd
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This doesn't do jack shit.
|
||||
internal class NullVisualEventReceiver : IVisualEventReceiver
|
||||
{
|
||||
public bool Selected { get { return false; } } //mxd
|
||||
|
||||
public void OnSelectBegin() { }
|
||||
public void OnSelectEnd() { }
|
||||
public void OnEditBegin() { }
|
||||
|
@ -56,6 +58,5 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public void ApplyLowerUnpegged(bool set) { }
|
||||
public string GetTextureName() { return ""; }
|
||||
public void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
|
||||
public bool IsSelected() { return false; } //mxd
|
||||
}
|
||||
}
|
||||
|
|
|
@ -571,8 +571,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// When current ceiling is part of a 3d floor, it looks like a floor, so we need to select adjacent floors
|
||||
if(level.sector != Sector.Sector && !regularorvavoom)
|
||||
{
|
||||
if((withSameTexture && side.Other.Sector.LongFloorTexture == level.sector.LongCeilTexture) ||
|
||||
(withSameHeight && side.Other.Sector.FloorHeight == level.sector.CeilHeight))
|
||||
if((!withSameTexture || side.Other.Sector.LongFloorTexture == level.sector.LongCeilTexture) &&
|
||||
(!withSameHeight || side.Other.Sector.FloorHeight == level.sector.CeilHeight))
|
||||
{
|
||||
neighbours.Add(side.Other.Sector);
|
||||
|
||||
|
@ -584,8 +584,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else // Regular ceiling or vavoom-type extra ceiling
|
||||
{
|
||||
// (De)select adjacent ceilings
|
||||
if((withSameTexture && side.Other.Sector.LongCeilTexture == level.sector.LongCeilTexture) ||
|
||||
(withSameHeight && side.Other.Sector.CeilHeight == level.sector.CeilHeight))
|
||||
if((!withSameTexture || side.Other.Sector.LongCeilTexture == level.sector.LongCeilTexture) &&
|
||||
(!withSameHeight || side.Other.Sector.CeilHeight == level.sector.CeilHeight))
|
||||
{
|
||||
neighbours.Add(side.Other.Sector);
|
||||
|
||||
|
@ -599,8 +599,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(VisualCeiling ec in vs.ExtraCeilings)
|
||||
{
|
||||
if(select == ec.Selected || ec.extrafloor.VavoomType != regularorvavoom) continue;
|
||||
if((withSameTexture && level.sector.LongCeilTexture == ec.level.sector.LongCeilTexture) ||
|
||||
(withSameHeight && level.sector.CeilHeight == ec.level.sector.CeilHeight))
|
||||
if((!withSameTexture || level.sector.LongCeilTexture == ec.level.sector.LongCeilTexture) &&
|
||||
(!withSameHeight || level.sector.CeilHeight == ec.level.sector.CeilHeight))
|
||||
{
|
||||
ec.SelectNeighbours(select, withSameTexture, withSameHeight);
|
||||
}
|
||||
|
@ -610,8 +610,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(VisualFloor ef in vs.ExtraFloors)
|
||||
{
|
||||
if(select == ef.Selected || ef.ExtraFloor.VavoomType == regularorvavoom) continue;
|
||||
if((withSameTexture && level.sector.LongCeilTexture == ef.Level.sector.LongFloorTexture) ||
|
||||
(withSameHeight && level.sector.CeilHeight == ef.Level.sector.FloorHeight))
|
||||
if((!withSameTexture || level.sector.LongCeilTexture == ef.Level.sector.LongFloorTexture) &&
|
||||
(!withSameHeight || level.sector.CeilHeight == ef.Level.sector.FloorHeight))
|
||||
{
|
||||
ef.SelectNeighbours(select, withSameTexture, withSameHeight);
|
||||
}
|
||||
|
|
|
@ -514,8 +514,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// When current floor is part of a 3d floor, it looks like a ceiling, so we need to select adjacent ceilings
|
||||
if(level.sector != Sector.Sector && !regularorvavoom)
|
||||
{
|
||||
if((withSameTexture && side.Other.Sector.LongCeilTexture == level.sector.LongFloorTexture) ||
|
||||
(withSameHeight && side.Other.Sector.CeilHeight == level.sector.FloorHeight))
|
||||
if((!withSameTexture || side.Other.Sector.LongCeilTexture == level.sector.LongFloorTexture) &&
|
||||
(!withSameHeight || side.Other.Sector.CeilHeight == level.sector.FloorHeight))
|
||||
{
|
||||
neighbours.Add(side.Other.Sector);
|
||||
|
||||
|
@ -527,8 +527,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else // Regular floor or vavoom-type extrafloor
|
||||
{
|
||||
// (De)select adjacent floor
|
||||
if((withSameTexture && side.Other.Sector.LongFloorTexture == level.sector.LongFloorTexture) ||
|
||||
(withSameHeight && side.Other.Sector.FloorHeight == level.sector.FloorHeight))
|
||||
if((!withSameTexture || side.Other.Sector.LongFloorTexture == level.sector.LongFloorTexture) &&
|
||||
(!withSameHeight || side.Other.Sector.FloorHeight == level.sector.FloorHeight))
|
||||
{
|
||||
neighbours.Add(side.Other.Sector);
|
||||
|
||||
|
@ -542,8 +542,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(VisualFloor ef in vs.ExtraFloors)
|
||||
{
|
||||
if(select == ef.Selected || ef.extrafloor.VavoomType != regularorvavoom) continue;
|
||||
if((withSameTexture && level.sector.LongFloorTexture == ef.level.sector.LongFloorTexture) ||
|
||||
(withSameHeight && level.sector.FloorHeight == ef.level.sector.FloorHeight))
|
||||
if((!withSameTexture || level.sector.LongFloorTexture == ef.level.sector.LongFloorTexture) &&
|
||||
(!withSameHeight || level.sector.FloorHeight == ef.level.sector.FloorHeight))
|
||||
{
|
||||
ef.SelectNeighbours(select, withSameTexture, withSameHeight);
|
||||
}
|
||||
|
@ -553,8 +553,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach(VisualCeiling ec in vs.ExtraCeilings)
|
||||
{
|
||||
if(select == ec.Selected || ec.ExtraFloor.VavoomType == regularorvavoom) continue;
|
||||
if((withSameTexture && level.sector.LongFloorTexture == ec.Level.sector.LongCeilTexture) ||
|
||||
(withSameHeight && level.sector.FloorHeight == ec.Level.sector.CeilHeight))
|
||||
if((!withSameTexture || level.sector.LongFloorTexture == ec.Level.sector.LongCeilTexture) &&
|
||||
(!withSameHeight || level.sector.FloorHeight == ec.Level.sector.CeilHeight))
|
||||
{
|
||||
ec.SelectNeighbours(select, withSameTexture, withSameHeight);
|
||||
}
|
||||
|
@ -589,8 +589,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
slopeSource = side.Line;
|
||||
isFront = true;
|
||||
break;
|
||||
}
|
||||
else if(side.Line.Args[0] == 2 && side.Line.Back != null && side.Line.Back == side)
|
||||
}
|
||||
|
||||
if(side.Line.Args[0] == 2 && side.Line.Back != null && side.Line.Back == side)
|
||||
{
|
||||
slopeSource = side.Line;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue