From 5a6e62aa4f557559cc50a3e79487f7e49dad3338 Mon Sep 17 00:00:00 2001 From: MaxED Date: Wed, 13 Jul 2016 21:53:48 +0000 Subject: [PATCH] Added, Visual mode: added support for ROLLCENTER sprite rendering flag, updated ROLLSPRITE implementation. Fixed, DECORATE support: the editor was unable to determine actor sprite when the actor itself had no sprites defined and the actor it inherited from was only defined in the game configuration. Fixed, Drag geometry modes: linedefs without both sides were removed after dragging them when "Replace with Dragged Geometry" mode was active. Updated ZDoom_DECORATE.cfg. --- Build/Scripting/ZDoom_DECORATE.cfg | 6 ++++ Source/Core/Map/MapSet.cs | 46 +++++++++++++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index 009c150..4cb1964 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -733,6 +733,12 @@ properties constants { +//rendering + FLATSPRITE; + ROLLSPRITE; + WALLSPRITE; + DONTFLIP; + ROLLCENTER; //pointers AAPTR_DEFAULT; AAPTR_NULL; diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs index b0d1a21..520e55f 100644 --- a/Source/Core/Map/MapSet.cs +++ b/Source/Core/Map/MapSet.cs @@ -3078,40 +3078,34 @@ namespace CodeImp.DoomBuilder.Map foreach(Linedef l in alllines) { // Remove line when it's start, center and end are inside a changed sector and neither side references it - if(l.Start != null && l.End != null) + if(l.Start != null && l.End != null + && (l.Front == null || !changedsectors.Contains(l.Front.Sector)) + && (l.Back == null || !changedsectors.Contains(l.Back.Sector))) { - if(l.Front == null && l.Back == null) + foreach(Sector s in changedsectors) { - l.Dispose(); - } - else if((l.Front == null || !changedsectors.Contains(l.Front.Sector)) && - (l.Back == null || !changedsectors.Contains(l.Back.Sector))) - { - foreach(Sector s in changedsectors) + if(s.Intersect(l.Start.Position) && s.Intersect(l.End.Position) && s.Intersect(l.GetCenterPoint())) { - if(s.Intersect(l.Start.Position) && s.Intersect(l.End.Position) && s.Intersect(l.GetCenterPoint())) + Vertex[] tocheck = { l.Start, l.End }; + l.Dispose(); + + foreach(Vertex v in tocheck) { - Vertex[] tocheck = { l.Start, l.End }; - l.Dispose(); - - foreach(Vertex v in tocheck) + // If the newly created vertex only has 2 linedefs attached, then merge the linedefs + if(!v.IsDisposed && v.Linedefs.Count == 2 && splitverts.Contains(v)) { - // If the newly created vertex only has 2 linedefs attached, then merge the linedefs - if(!v.IsDisposed && v.Linedefs.Count == 2 && splitverts.Contains(v)) - { - Linedef ld1 = General.GetByIndex(v.Linedefs, 0); - Linedef ld2 = General.GetByIndex(v.Linedefs, 1); - Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start; - if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2); - ld2.Dispose(); + Linedef ld1 = General.GetByIndex(v.Linedefs, 0); + Linedef ld2 = General.GetByIndex(v.Linedefs, 1); + Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start; + if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2); + ld2.Dispose(); - // Trash vertex - v.Dispose(); - } + // Trash vertex + v.Dispose(); } - - break; } + + break; } } }