From 6e98b29c5c9c361ae681b94c429d29764efd8068 Mon Sep 17 00:00:00 2001 From: codeimp Date: Mon, 27 Apr 2009 17:32:23 +0000 Subject: [PATCH] Fixed updating of both sides of a linedef when Upper/Lower Unpegged is changed in Visual Mode --- .../VisualModes/BaseVisualGeometrySidedef.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs index 5dd7804e..4e0639b4 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs @@ -233,6 +233,17 @@ namespace CodeImp.DoomBuilder.BuilderModes if(parts.middledouble != null) parts.middledouble.Setup(); if(parts.middlesingle != null) parts.middlesingle.Setup(); if(parts.upper != null) parts.upper.Setup(); + + // Update other sidedef geometry + if(Sidedef.Other != null) + { + BaseVisualSector othersector = (BaseVisualSector)mode.GetVisualSector(Sidedef.Other.Sector); + parts = othersector.GetSidedefParts(Sidedef.Other); + if(parts.lower != null) parts.lower.Setup(); + if(parts.middledouble != null) parts.middledouble.Setup(); + if(parts.middlesingle != null) parts.middlesingle.Setup(); + if(parts.upper != null) parts.upper.Setup(); + } } // Toggle lower-unpegged @@ -260,6 +271,17 @@ namespace CodeImp.DoomBuilder.BuilderModes if(parts.middledouble != null) parts.middledouble.Setup(); if(parts.middlesingle != null) parts.middlesingle.Setup(); if(parts.upper != null) parts.upper.Setup(); + + // Update other sidedef geometry + if(Sidedef.Other != null) + { + BaseVisualSector othersector = (BaseVisualSector)mode.GetVisualSector(Sidedef.Other.Sector); + parts = othersector.GetSidedefParts(Sidedef.Other); + if(parts.lower != null) parts.lower.Setup(); + if(parts.middledouble != null) parts.middledouble.Setup(); + if(parts.middlesingle != null) parts.middlesingle.Setup(); + if(parts.upper != null) parts.upper.Setup(); + } } // Flood-fill textures