Properly check for flat alignment linedefs for floors/ceilings in Visual Mode.

This commit is contained in:
sphere 2021-08-26 13:59:31 +02:00
parent 131770266a
commit 4833ba765e
2 changed files with 2 additions and 2 deletions

View file

@ -241,7 +241,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
Linedef alignment = null;
foreach (Sidedef side in s.Sidedefs)
if (side.Line.IsFlatAlignment && side.Line.Tag == 0 && side.Sector == s) alignment = side.Line;
if (side.Line.IsFlatAlignment && side.Line.Tag == 0 && side.Line.Front.Sector == s) alignment = side.Line;
if (alignment == null)
{
mode.SetActionResult("Sector has no flat alignment line!");

View file

@ -229,7 +229,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
Linedef alignment = null;
foreach (Sidedef side in s.Sidedefs)
if (side.Line.IsFlatAlignment && side.Line.Tag == 0 && side.Sector == s) alignment = side.Line;
if (side.Line.IsFlatAlignment && side.Line.Tag == 0 && side.Line.Front.Sector == s) alignment = side.Line;
if (alignment == null)
{
mode.SetActionResult("Sector has no flat alignment line!");