Fixes to non-essential vertex/line detection.

This commit is contained in:
sphere 2021-11-15 20:32:58 +01:00
parent 4f2a8a15ca
commit cf516fd0e6
2 changed files with 4 additions and 4 deletions

View file

@ -1208,7 +1208,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
foreach (Linedef ld in selected)
{
if (ld.Back != null && ld.Front.Sector == ld.Back.Sector)
if (ld.Back != null && ld.Front.Sector == ld.Back.Sector && ld.Action != 0)
counter++;
else
ld.Selected = false;

View file

@ -998,8 +998,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
Linedef ld2 = General.GetByIndex(v.Linedefs, 1);
int angle1 = (int)Math.Round(ld1.Angle * Angle2D.PIDEG);
int angle2 = (int)Math.Round(ld2.Angle * Angle2D.PIDEG);
if (ld1.Action == 0 && ld2.Action == 0 &&
(angle1 == angle2 || angle1 == angle2 + 180 || angle1 + 180 == angle2))
if ((angle1 == angle2 || angle1 == angle2 + 180 || angle1 + 180 == angle2) &&
((ld1.Action == 0 && ld2.Action == 0) || (ld1.GetFlags() == ld2.GetFlags() && ld1.Action == ld2.Action)))
counter++;
else
v.Selected = false;