A few bugfixes for some of the new actions.

This commit is contained in:
sphere 2021-05-10 23:52:54 +02:00
parent 8ab32cd8d5
commit b9c5f33ec2
3 changed files with 29 additions and 7 deletions

View file

@ -250,15 +250,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (General.Map.SRB2)
{
bool existing = true;
// don't overwrite existing tags or actions
if (l.Tag != 0 || (!l.IsFlatAlignment && l.Action != 0))
continue;
// add flat alignment effect to new linedefs
if (!l.IsFlatAlignment)
{
l.Action = General.Map.FormatInterface.FlatAlignmentType;
if (l.Action != 0) // don't overwrite other actions
continue;
else
{
l.Action = General.Map.FormatInterface.FlatAlignmentType;
existing = false;
}
}
if (l.Tag != 0)
{
l.Tag = 0;
existing = false;
}
@ -1291,6 +1297,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
l.Action = 0;
l.Tag = 0;
// reset hacky flat alignment
l.Front.Sector.UpdateFloorSurface();
l.Front.Sector.UpdateCeilingSurface();
}
// Update cache values
@ -1303,6 +1313,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Redraw screen
UpdateSelectionInfo(); //mxd
General.Interface.RefreshInfo();
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
General.Interface.RedrawDisplay();
}
@ -1337,6 +1348,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
l.SetFlag(General.Map.Config.DoubleSidedFlag, true);
else
l.SetFlag(General.Map.Config.ImpassableFlag, true);
// reset hacky flat alignment
l.Front.Sector.UpdateFloorSurface();
l.Front.Sector.UpdateCeilingSurface();
}
// Update cache values
@ -1349,6 +1364,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Redraw screen
UpdateSelectionInfo(); //mxd
General.Interface.RefreshInfo();
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
General.Interface.RedrawDisplay();
}

View file

@ -1786,6 +1786,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
s.Effect = 0;
s.Tag = 0;
// reset hacky flat alignment
s.UpdateFloorSurface();
s.UpdateCeilingSurface();
}
// Update cache values
@ -1798,6 +1802,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Redraw screen
UpdateSelectionInfo(); //mxd
General.Interface.RefreshInfo();
General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd
General.Interface.RedrawDisplay();
}

View file

@ -1081,6 +1081,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Redraw screen
UpdateSelectionInfo(); //mxd
General.Interface.RefreshInfo();
General.Interface.RedrawDisplay();
}
}