Fixed: VirtualSectorField was cleared from sector properties when pasting map geometry in Doom/Hexen map formats leading to incorrect sector assignment [I broke this in r2009, so it seems].

This commit is contained in:
MaxED 2014-10-03 21:55:38 +00:00
parent 9d69448cad
commit 6bc4325b36
2 changed files with 8 additions and 6 deletions

View file

@ -433,11 +433,13 @@ namespace CodeImp.DoomBuilder.Map
selecteditem = null; selecteditem = null;
} }
// This removes UDMF stuff // This removes UDMF stuff (mxd)
internal void TranslateFromUDMF() internal void TranslateFromUDMF()
{ {
// Clear UDMF-related properties // Clear UDMF-related properties (but keep VirtualSectorField!)
bool isvirtual = this.Fields.ContainsKey(MapSet.VirtualSectorField);
this.Fields.Clear(); this.Fields.Clear();
if(isvirtual) this.Fields.Add(MapSet.VirtualSectorField, MapSet.VirtualSectorValue);
this.Flags.Clear(); this.Flags.Clear();
hasFogColor = false; hasFogColor = false;
useOutsideFog = false; useOutsideFog = false;

View file

@ -490,7 +490,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void PlotAssociations(IRenderer2D renderer, Association asso) public void PlotAssociations(IRenderer2D renderer, Association asso)
{ {
// Tag must be above zero // Tag must be above zero
if(asso.tag <= 0) return; if(asso.tag < 1) return;
// Sectors? // Sectors?
if(asso.type == UniversalType.SectorTag) if(asso.type == UniversalType.SectorTag)
@ -535,7 +535,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void RenderAssociations(IRenderer2D renderer, Association asso) public void RenderAssociations(IRenderer2D renderer, Association asso)
{ {
// Tag must be above zero // Tag must be above zero
if(asso.tag <= 0) return; if(asso.tag < 1) return;
// Things? // Things?
if(asso.type == UniversalType.ThingTag) if(asso.type == UniversalType.ThingTag)
@ -573,7 +573,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void PlotReverseAssociations(IRenderer2D renderer, Association asso) public void PlotReverseAssociations(IRenderer2D renderer, Association asso)
{ {
// Tag must be above zero // Tag must be above zero
if(asso.tag <= 0) return; if(asso.tag < 1) return;
List<Line3D> lines = new List<Line3D>(); //mxd List<Line3D> lines = new List<Line3D>(); //mxd
@ -635,7 +635,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public void RenderReverseAssociations(IRenderer2D renderer, Association asso) public void RenderReverseAssociations(IRenderer2D renderer, Association asso)
{ {
// Tag must be above zero // Tag must be above zero
if(asso.tag <= 0) return; if(asso.tag < 1) return;
List<Line3D> lines = new List<Line3D>(); //mxd List<Line3D> lines = new List<Line3D>(); //mxd