mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +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,11 +547,17 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// This flips the linedef's vertex attachments
|
||||
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
|
||||
Vertex oldstart = start;
|
||||
Vertex oldend = end;
|
||||
SetStartVertex(oldend);
|
||||
SetEndVertex(oldstart);
|
||||
|
||||
General.Map.Map.AutoRemove = true;
|
||||
|
||||
// For drawing, the interior now lies on the other side
|
||||
frontinterior = !frontinterior;
|
||||
|
|
Loading…
Reference in a new issue