mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
3D Floor Mode: duplicating geometry now copies all properties of the source control sector's linedef to the new control sector's linedef
This commit is contained in:
parent
6e885fbcf5
commit
077aa065cb
3 changed files with 13 additions and 6 deletions
|
@ -984,7 +984,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
try
|
||||
{
|
||||
foreach (ThreeDFloor tdf in sectorsToThreeDFloors[sectors.First()])
|
||||
tdf.BindTag(newtag);
|
||||
tdf.BindTag(newtag, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.BuilderModes;
|
||||
using CodeImp.DoomBuilder.Windows;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
@ -55,6 +56,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
private bool isnew;
|
||||
private int udmftag;
|
||||
private List<int> tags;
|
||||
private LinedefProperties linedefproperties;
|
||||
|
||||
public static Rectangle controlsectorarea = new Rectangle(-512, 512, 512, -512);
|
||||
|
||||
|
@ -78,6 +80,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
public double FloorSlopeOffset { get { return floorslopeoffset; } set { floorslopeoffset = value; } }
|
||||
public Vector3D CeilingSlope { get { return ceilingslope; } set { ceilingslope = value; } }
|
||||
public double CeilingSlopeOffset { get { return ceilingslopeoffset; } set { ceilingslopeoffset = value; } }
|
||||
public LinedefProperties LinedefProperties { get { return linedefproperties; } }
|
||||
|
||||
public ThreeDFloor()
|
||||
{
|
||||
|
@ -131,6 +134,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
type = sd.Line.Args[1];
|
||||
flags = sd.Line.Args[2];
|
||||
alpha = sd.Line.Args[3];
|
||||
linedefproperties = new LinedefProperties(sd.Line);
|
||||
|
||||
foreach (Sector s in BuilderPlug.GetSectorsByTag(potentialsectors, sd.Line.Args[0]))
|
||||
{
|
||||
|
@ -141,7 +145,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
}
|
||||
}
|
||||
|
||||
public void BindTag(int tag)
|
||||
public void BindTag(int tag, LinedefProperties ldprops)
|
||||
{
|
||||
Linedef line = null;
|
||||
|
||||
|
@ -184,6 +188,9 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
General.Interface.RedrawDisplay();
|
||||
}
|
||||
|
||||
if(ldprops != null)
|
||||
ldprops.Apply(new List<Linedef>() { line }, false);
|
||||
|
||||
line.Action = 160;
|
||||
line.Args[0] = tag;
|
||||
line.Args[1] = type;
|
||||
|
@ -224,10 +231,10 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
{
|
||||
int newtag;
|
||||
|
||||
return CreateGeometry(tagblacklist, alldrawnvertices, false, out newtag);
|
||||
return CreateGeometry(tagblacklist, alldrawnvertices, null, false, out newtag);
|
||||
}
|
||||
|
||||
public bool CreateGeometry(List<int> tagblacklist, List<DrawnVertex> alldrawnvertices, bool forcenewtag, out int newtag)
|
||||
public bool CreateGeometry(List<int> tagblacklist, List<DrawnVertex> alldrawnvertices, LinedefProperties ldprops, bool forcenewtag, out int newtag)
|
||||
{
|
||||
List<Vertex> vertices = new List<Vertex>();
|
||||
Vector3D slopetopthingpos = new Vector3D(0, 0, 0);
|
||||
|
@ -287,7 +294,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
tagblacklist.Add(udmftag);
|
||||
}
|
||||
|
||||
BindTag(udmftag);
|
||||
BindTag(udmftag, ldprops);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1574,7 +1574,7 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode
|
|||
int newtag;
|
||||
int oldtag = tdf.UDMFTag;
|
||||
|
||||
if(!tdf.CreateGeometry(new List<int>(), drawnvertices, true, out newtag))
|
||||
if(!tdf.CreateGeometry(new List<int>(), drawnvertices, tdf.LinedefProperties, true, out newtag))
|
||||
{
|
||||
// No need to show a warning here, that was already done by CreateGeometry
|
||||
General.Map.UndoRedo.WithdrawUndo();
|
||||
|
|
Loading…
Reference in a new issue