Some drawing/merging behavior cosmetics

This commit is contained in:
codeimp 2009-05-06 10:06:45 +00:00
parent abfb16c35d
commit 65521d1ea6
3 changed files with 28 additions and 0 deletions

View file

@ -1886,11 +1886,22 @@ namespace CodeImp.DoomBuilder.Map
// Not the same line?
if(l1 != l2)
{
bool flipresult = (l1.End == l2.Start);
// Merge these two linedefs
//while(lines.Remove(l1));
//l1.Join(l2);
while(lines.Remove(l2)) ;
l2.Join(l1);
// The flipping is purely a cosmetic to preserve orientation
// when drawing new lines over older lines
if(flipresult)
{
l1.FlipVertices();
l1.FlipSidedefs();
}
joinsdone++;
joined = true;
break;
@ -1911,11 +1922,22 @@ namespace CodeImp.DoomBuilder.Map
// Not the same line?
if(l1 != l2)
{
bool flipresult = (l1.End == l2.Start);
// Merge these two linedefs
//while(lines.Remove(l1));
//l1.Join(l2);
while(lines.Remove(l2)) ;
l2.Join(l1);
// The flipping is purely a cosmetic to preserve orientation
// when drawing new lines over older lines
if(flipresult)
{
l1.FlipVertices();
l1.FlipSidedefs();
}
joinsdone++;
joined = true;
break;

View file

@ -316,6 +316,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Stitch geometry
if(snaptonearest) General.Map.Map.StitchGeometry();
// Make corrections for backward linedefs
MapSet.FlipBackwardLinedefs(General.Map.Map.Linedefs);
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();

View file

@ -908,6 +908,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Stitch geometry
if(snaptonearest) General.Map.Map.StitchGeometry();
// Make corrections for backward linedefs
MapSet.FlipBackwardLinedefs(General.Map.Map.Linedefs);
// Snap to map format accuracy
General.Map.Map.SnapAllToAccuracy();