Fixed updating of both sides of a linedef when Upper/Lower Unpegged is changed in Visual Mode

This commit is contained in:
codeimp 2009-04-27 17:32:23 +00:00
parent fa6e71419d
commit 6e98b29c5c

View file

@ -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