mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 14:12:16 +00:00
Fixed a bug where flipping a line resulted in a crash, if its start vertex did not belong to any other line
This commit is contained in:
parent
a42d9143e0
commit
6eb77d0bc0
1 changed files with 6 additions and 0 deletions
|
@ -547,12 +547,18 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
// This flips the linedef's vertex attachments
|
// This flips the linedef's vertex attachments
|
||||||
public void FlipVertices()
|
public void FlipVertices()
|
||||||
{
|
{
|
||||||
|
// make sure the start/end vertices are not automatically
|
||||||
|
// deleted if they do not belong to any other line
|
||||||
|
General.Map.Map.AutoRemove = false;
|
||||||
|
|
||||||
// Flip vertices
|
// Flip vertices
|
||||||
Vertex oldstart = start;
|
Vertex oldstart = start;
|
||||||
Vertex oldend = end;
|
Vertex oldend = end;
|
||||||
SetStartVertex(oldend);
|
SetStartVertex(oldend);
|
||||||
SetEndVertex(oldstart);
|
SetEndVertex(oldstart);
|
||||||
|
|
||||||
|
General.Map.Map.AutoRemove = true;
|
||||||
|
|
||||||
// For drawing, the interior now lies on the other side
|
// For drawing, the interior now lies on the other side
|
||||||
frontinterior = !frontinterior;
|
frontinterior = !frontinterior;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue