mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
- Sector splitting fix
- Adjusted vertical line spacing to text in script editor for readability
This commit is contained in:
parent
049b0a7954
commit
a4dedc56a3
3 changed files with 61 additions and 19 deletions
|
@ -328,6 +328,38 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spacing above a line
|
||||
/// </summary>
|
||||
public int ExtraAscent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)FastPerform(2526, 0, 0);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
FastPerform(2525, (uint)value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spacing below a line
|
||||
/// </summary>
|
||||
public int ExtraDescent
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)FastPerform(2528, 0, 0);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
FastPerform(2527, (uint)value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the number of characters in the document.
|
||||
///
|
||||
|
|
|
@ -130,6 +130,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
scriptedit.SetFoldFlags((int)ScriptFoldFlag.Box);
|
||||
scriptedit.TabWidth = 4; // This should be in the preferences dialog
|
||||
scriptedit.Indent = 4;
|
||||
scriptedit.ExtraAscent = 1;
|
||||
scriptedit.ExtraDescent = 1;
|
||||
|
||||
// Symbol margin
|
||||
scriptedit.SetMarginTypeN(0, (int)ScriptMarginType.Symbol);
|
||||
|
|
|
@ -1887,22 +1887,26 @@ namespace CodeImp.DoomBuilder.Map
|
|||
if(l1 != l2)
|
||||
{
|
||||
bool oppositedirection = (l1.End == l2.Start);
|
||||
bool l2marked = l2.Marked;
|
||||
|
||||
// Merge these two linedefs
|
||||
while(lines.Remove(l2)) ;
|
||||
l2.Join(l1);
|
||||
|
||||
// The flipping is purely a cosmetic to preserve orientation
|
||||
// when drawing new lines over older lines
|
||||
if(oppositedirection)
|
||||
if(l2marked)
|
||||
{
|
||||
l1.FlipVertices();
|
||||
l1.FlipSidedefs();
|
||||
// The flipping is purely a cosmetic to preserve orientation
|
||||
// when drawing new lines over older lines
|
||||
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;
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
@ -1925,22 +1929,26 @@ namespace CodeImp.DoomBuilder.Map
|
|||
if(l1 != l2)
|
||||
{
|
||||
bool oppositedirection = (l1.Start == l2.End);
|
||||
|
||||
bool l2marked = l2.Marked;
|
||||
|
||||
// Merge these two linedefs
|
||||
while(lines.Remove(l2)) ;
|
||||
l2.Join(l1);
|
||||
|
||||
// The flipping is purely a cosmetic to preserve orientation
|
||||
// when drawing new lines over older lines
|
||||
if(oppositedirection)
|
||||
if(l2marked)
|
||||
{
|
||||
l1.FlipVertices();
|
||||
l1.FlipSidedefs();
|
||||
}
|
||||
// The flipping is purely a cosmetic to preserve orientation
|
||||
// when drawing new lines over older lines
|
||||
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;
|
||||
// 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;
|
||||
|
|
Loading…
Reference in a new issue