mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-04-22 09:31:14 +00:00
Fixed, all drawing modes: in some cases incorrect sector shape was constructed when updating sector shapes after drawing new lines, which resulted in nearby sectors being merged into sector(s) affected by linedefs drawing.
This commit is contained in:
parent
6c7cf6d432
commit
8fdb230f52
2 changed files with 15 additions and 5 deletions
|
@ -103,6 +103,14 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
return (this.line == other.line) && (this.front == other.front);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
//mxd. Useful when debugging...
|
||||
public override string ToString()
|
||||
{
|
||||
return line + " (" + (front ? "front" : "back") + ")";
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -389,10 +389,12 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
Linedef prevline = nextline;
|
||||
nextline = (lines[0] == nextline ? lines[1] : lines[0]);
|
||||
|
||||
//mxd. Try to pick a line with lower tracecount...
|
||||
// Otherwise we will just walk the same path trise
|
||||
//mxd. Try to pick a line with lower tracecount, otherwise we will just walk the same path trise
|
||||
int curcount = (!tracecount.ContainsKey(nextline) ? 0 : tracecount[nextline]);
|
||||
if(curcount > 0)
|
||||
|
||||
//mxd. Don't pick a different line for start and end lines, otherwise the path can go away from it instead of closing the path
|
||||
//mxd. Also don't pick a different line for marked lines (these are newly drawn lines, and we don't want to skip them)
|
||||
if(curcount > 0 && !nextline.Marked && nextline != startline && nextline != endline)
|
||||
{
|
||||
foreach(Linedef l in lines)
|
||||
{
|
||||
|
@ -408,8 +410,8 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
if(!tracecount.ContainsKey(nextline) || (tracecount[nextline] < 3))
|
||||
{
|
||||
// Check if front side changes
|
||||
if((prevline.Start == nextline.Start) ||
|
||||
(prevline.End == nextline.End)) nextfront = !nextfront;
|
||||
if(prevline.Start == nextline.Start || prevline.End == nextline.End)
|
||||
nextfront = !nextfront;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue