mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-29 15:11:56 +00:00
removing a vertex that has exactly 2 linedefs attached now leaves one linedef connected to the other linedef's vertex. also removed some unneeded template code.
This commit is contained in:
parent
f3354d4c0a
commit
f8574ace7a
8 changed files with 38 additions and 9 deletions
|
@ -3,10 +3,22 @@ quality over quantity. It is done when it's done.
|
|||
The order and included items may also change any time.
|
||||
=========================================================
|
||||
|
||||
- Fix up nodebuilder configurations and all user to choose no nodebuilder.
|
||||
|
||||
- Create menus for different modes
|
||||
|
||||
- Create gradient ceiling/floor heights feature
|
||||
|
||||
- Fix flats alignment in Visual Mode (possibly also in Classic Modes)
|
||||
|
||||
- Fix flat texture coordinates in Classic Modes (some flats/textures on floors appear stretched or shrinked)
|
||||
|
||||
- Right-click in empty space in Linedefs mode does weird.
|
||||
|
||||
- Edit Selection mode does not take size of things into account.
|
||||
|
||||
- Set up forum for bug reports and development.
|
||||
|
||||
=========================================================
|
||||
BETA TESTING STARTS HERE
|
||||
OFFICIAL MANUAL WRITING STARTS HERE
|
||||
|
|
|
@ -461,8 +461,25 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
General.Map.UndoRedo.CreateUndo("Delete vertex");
|
||||
|
||||
// Dispose selected vertices
|
||||
foreach(Vertex v in selected) v.Dispose();
|
||||
// Go for all vertices that need to be removed
|
||||
foreach(Vertex v in selected)
|
||||
{
|
||||
// If the vertex only has 2 linedefs attached, then merge the linedefs
|
||||
if(v.Linedefs.Count == 2)
|
||||
{
|
||||
Linedef ld1 = General.GetByIndex(v.Linedefs, 0);
|
||||
Linedef ld2 = General.GetByIndex(v.Linedefs, 1);
|
||||
Vertex v1 = (ld1.Start == v) ? ld1.End : ld1.Start;
|
||||
Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start;
|
||||
if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2);
|
||||
//if(ld2.Start == v) ld2.SetStartVertex(v1); else ld2.SetEndVertex(v1);
|
||||
//ld1.Join(ld2);
|
||||
ld2.Dispose();
|
||||
}
|
||||
|
||||
// Trash vertex
|
||||
v.Dispose();
|
||||
}
|
||||
|
||||
// Update cache values
|
||||
General.Map.IsChanged = true;
|
||||
|
|
|
@ -361,7 +361,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
if(General.Map.Map.Sectors.Count > 0)
|
||||
{
|
||||
foundone = true;
|
||||
defaultfloortexture = General.GetByIndex<Sector>(General.Map.Map.Sectors, 0).FloorTexture;
|
||||
defaultfloortexture = General.GetByIndex(General.Map.Map.Sectors, 0).FloorTexture;
|
||||
}
|
||||
|
||||
// Pick the first FLOOR from the list.
|
||||
|
@ -391,7 +391,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
if(General.Map.Map.Sectors.Count > 0)
|
||||
{
|
||||
foundone = true;
|
||||
defaultceiltexture = General.GetByIndex<Sector>(General.Map.Map.Sectors, 0).CeilTexture;
|
||||
defaultceiltexture = General.GetByIndex(General.Map.Map.Sectors, 0).CeilTexture;
|
||||
}
|
||||
|
||||
// Pick the first FLOOR from the list.
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.Geometry
|
|||
// See: http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/
|
||||
public static bool PointInPolygon(ICollection<Vector2D> polygon, Vector2D point)
|
||||
{
|
||||
Vector2D v1 = General.GetByIndex<Vector2D>(polygon, polygon.Count - 1);
|
||||
Vector2D v1 = General.GetByIndex(polygon, polygon.Count - 1);
|
||||
uint c = 0;
|
||||
|
||||
// Go for all vertices
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
fieldslist.Setup(elementname);
|
||||
|
||||
// Setup from first element
|
||||
MapElement fe = General.GetByIndex<MapElement>(elements, 0);
|
||||
MapElement fe = General.GetByIndex(elements, 0);
|
||||
fieldslist.SetValues(fe.Fields, true);
|
||||
|
||||
// Setup from all elements
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Get first line
|
||||
fl = General.GetByIndex<Linedef>(lines, 0);
|
||||
fl = General.GetByIndex(lines, 0);
|
||||
|
||||
// Flags
|
||||
foreach(CheckBox c in flags.Checkboxes)
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Get first sector
|
||||
sc = General.GetByIndex<Sector>(sectors, 0);
|
||||
sc = General.GetByIndex(sectors, 0);
|
||||
|
||||
// Effects
|
||||
effect.Value = sc.Effect;
|
||||
|
|
|
@ -111,7 +111,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Set all options to the first thing properties
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ft = General.GetByIndex<Thing>(things, 0);
|
||||
ft = General.GetByIndex(things, 0);
|
||||
|
||||
// Set type index
|
||||
typeid.Text = ft.Type.ToString();
|
||||
|
|
Loading…
Reference in a new issue