mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-06-02 09:51:47 +00:00
Changed drawing behavior so that drawn lines are not corrected to clockwise orientation
This commit is contained in:
parent
65521d1ea6
commit
91b76bcb5b
5 changed files with 92 additions and 44 deletions
|
@ -1886,21 +1886,23 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Not the same line?
|
||||
if(l1 != l2)
|
||||
{
|
||||
bool flipresult = (l1.End == l2.Start);
|
||||
bool oppositedirection = (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)
|
||||
if(oppositedirection)
|
||||
{
|
||||
l1.FlipVertices();
|
||||
l1.FlipSidedefs();
|
||||
}
|
||||
|
||||
// Direction is now the same, so the interior side is also the same
|
||||
// We have to copy the interior side to preserve this for drawing
|
||||
l1.FrontInterior = l2.FrontInterior;
|
||||
|
||||
joinsdone++;
|
||||
joined = true;
|
||||
|
@ -1922,22 +1924,24 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Not the same line?
|
||||
if(l1 != l2)
|
||||
{
|
||||
bool flipresult = (l1.End == l2.Start);
|
||||
bool oppositedirection = (l1.Start == l2.End);
|
||||
|
||||
// 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)
|
||||
if(oppositedirection)
|
||||
{
|
||||
l1.FlipVertices();
|
||||
l1.FlipSidedefs();
|
||||
}
|
||||
|
||||
|
||||
// Direction is now the same, so the interior side is also the same
|
||||
// We have to copy the interior side to preserve this for drawing
|
||||
l1.FrontInterior = l2.FrontInterior;
|
||||
|
||||
joinsdone++;
|
||||
joined = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue