mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed a problem with visual vertex slope indicator angles
This commit is contained in:
parent
2b6c7b44c2
commit
90e7dd1149
1 changed files with 8 additions and 14 deletions
|
@ -84,18 +84,6 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
List<LineAngleInfo> lines = new List<LineAngleInfo>();
|
||||
List<double> angles = new List<double>();
|
||||
|
||||
// Special case handling
|
||||
if (vertex.Linedefs.Count == 0) // should never happen
|
||||
{
|
||||
angle = 0.0;
|
||||
return;
|
||||
}
|
||||
else if (vertex.Linedefs.Count == 1)
|
||||
{
|
||||
angle = vertex.Linedefs.First().Angle + Angle2D.PIHALF;
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all lines that we have to take into account. Ignore linedefs where both sides
|
||||
// don't belong to the sector or don't belong to the sector
|
||||
foreach (Linedef ld in vertex.Linedefs)
|
||||
|
@ -121,9 +109,15 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
}
|
||||
|
||||
// Special case handling
|
||||
if(lines.Count == 0)
|
||||
if (lines.Count < 2)
|
||||
{
|
||||
angle = lines[0].angle;
|
||||
if (vertex.Linedefs.Count == 1)
|
||||
{
|
||||
angle = vertex.Linedefs.First().Angle + Angle2D.PIHALF;
|
||||
return;
|
||||
}
|
||||
|
||||
angle = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue