mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-28 06:42:32 +00:00
3D Floor Mode: duplicating geometry now copies all properties of the source control sector to the new control sector
This commit is contained in:
parent
077aa065cb
commit
d1455df383
2 changed files with 12 additions and 3 deletions
|
@ -57,6 +57,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
private int udmftag;
|
private int udmftag;
|
||||||
private List<int> tags;
|
private List<int> tags;
|
||||||
private LinedefProperties linedefproperties;
|
private LinedefProperties linedefproperties;
|
||||||
|
private SectorProperties sectorproperties;
|
||||||
|
|
||||||
public static Rectangle controlsectorarea = new Rectangle(-512, 512, 512, -512);
|
public static Rectangle controlsectorarea = new Rectangle(-512, 512, 512, -512);
|
||||||
|
|
||||||
|
@ -81,6 +82,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
public Vector3D CeilingSlope { get { return ceilingslope; } set { ceilingslope = value; } }
|
public Vector3D CeilingSlope { get { return ceilingslope; } set { ceilingslope = value; } }
|
||||||
public double CeilingSlopeOffset { get { return ceilingslopeoffset; } set { ceilingslopeoffset = value; } }
|
public double CeilingSlopeOffset { get { return ceilingslopeoffset; } set { ceilingslopeoffset = value; } }
|
||||||
public LinedefProperties LinedefProperties { get { return linedefproperties; } }
|
public LinedefProperties LinedefProperties { get { return linedefproperties; } }
|
||||||
|
public SectorProperties SectorProperties { get { return sectorproperties; } }
|
||||||
|
|
||||||
public ThreeDFloor()
|
public ThreeDFloor()
|
||||||
{
|
{
|
||||||
|
@ -99,6 +101,9 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
ceilingslope = new Vector3D(0.0f, 0.0f, 0.0f);
|
ceilingslope = new Vector3D(0.0f, 0.0f, 0.0f);
|
||||||
ceilingslopeoffset = 0.0f;
|
ceilingslopeoffset = 0.0f;
|
||||||
|
|
||||||
|
linedefproperties = null;
|
||||||
|
sectorproperties = null;
|
||||||
|
|
||||||
alpha = 255;
|
alpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,6 +140,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
flags = sd.Line.Args[2];
|
flags = sd.Line.Args[2];
|
||||||
alpha = sd.Line.Args[3];
|
alpha = sd.Line.Args[3];
|
||||||
linedefproperties = new LinedefProperties(sd.Line);
|
linedefproperties = new LinedefProperties(sd.Line);
|
||||||
|
sectorproperties = new SectorProperties(sector);
|
||||||
|
|
||||||
foreach (Sector s in BuilderPlug.GetSectorsByTag(potentialsectors, sd.Line.Args[0]))
|
foreach (Sector s in BuilderPlug.GetSectorsByTag(potentialsectors, sd.Line.Args[0]))
|
||||||
{
|
{
|
||||||
|
@ -231,10 +237,10 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
{
|
{
|
||||||
int newtag;
|
int newtag;
|
||||||
|
|
||||||
return CreateGeometry(tagblacklist, alldrawnvertices, null, false, out newtag);
|
return CreateGeometry(tagblacklist, alldrawnvertices, null, null, false, out newtag);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CreateGeometry(List<int> tagblacklist, List<DrawnVertex> alldrawnvertices, LinedefProperties ldprops, bool forcenewtag, out int newtag)
|
public bool CreateGeometry(List<int> tagblacklist, List<DrawnVertex> alldrawnvertices, LinedefProperties ldprops, SectorProperties sectorprops, bool forcenewtag, out int newtag)
|
||||||
{
|
{
|
||||||
List<Vertex> vertices = new List<Vertex>();
|
List<Vertex> vertices = new List<Vertex>();
|
||||||
Vector3D slopetopthingpos = new Vector3D(0, 0, 0);
|
Vector3D slopetopthingpos = new Vector3D(0, 0, 0);
|
||||||
|
@ -265,6 +271,9 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
|
|
||||||
sector = General.Map.Map.GetMarkedSectors(true)[0];
|
sector = General.Map.Map.GetMarkedSectors(true)[0];
|
||||||
|
|
||||||
|
if (sectorprops != null)
|
||||||
|
sectorprops.Apply(new List<Sector>() { sector }, false);
|
||||||
|
|
||||||
sector.FloorHeight = bottomheight;
|
sector.FloorHeight = bottomheight;
|
||||||
sector.CeilHeight = topheight;
|
sector.CeilHeight = topheight;
|
||||||
sector.SetFloorTexture(bottomflat);
|
sector.SetFloorTexture(bottomflat);
|
||||||
|
|
|
@ -1574,7 +1574,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
||||||
int newtag;
|
int newtag;
|
||||||
int oldtag = tdf.UDMFTag;
|
int oldtag = tdf.UDMFTag;
|
||||||
|
|
||||||
if(!tdf.CreateGeometry(new List<int>(), drawnvertices, tdf.LinedefProperties, true, out newtag))
|
if(!tdf.CreateGeometry(new List<int>(), drawnvertices, tdf.LinedefProperties, tdf.SectorProperties, true, out newtag))
|
||||||
{
|
{
|
||||||
// No need to show a warning here, that was already done by CreateGeometry
|
// No need to show a warning here, that was already done by CreateGeometry
|
||||||
General.Map.UndoRedo.WithdrawUndo();
|
General.Map.UndoRedo.WithdrawUndo();
|
||||||
|
|
Loading…
Reference in a new issue