mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed, Visual mode: "render as sky" flag was not updated for upper wall geometry when pasting textures (and in some other cases).
This commit is contained in:
parent
5eb5ffbc0b
commit
a4699e156d
3 changed files with 21 additions and 5 deletions
|
@ -95,6 +95,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// This changes the height
|
||||
protected abstract void ChangeHeight(int amount);
|
||||
protected abstract void ChangeTextureScale(int incrementX, int incrementY); //mxd
|
||||
protected abstract void UpdateSkyRenderFlag(); //mxd
|
||||
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd
|
||||
|
||||
// This swaps triangles so that the plane faces the other way
|
||||
|
@ -218,14 +219,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
//mxd
|
||||
protected void OnTextureChanged()
|
||||
{
|
||||
//mxd. Effects may need updating...
|
||||
// Effects may need updating...
|
||||
mode.RebuildElementData();
|
||||
|
||||
// As well as sky render flag...
|
||||
UpdateSkyRenderFlag();
|
||||
|
||||
if(level.sector == this.Sector.Sector)
|
||||
{
|
||||
this.Setup();
|
||||
|
||||
//mxd. 3D floors may need updating...
|
||||
// 3D floors may need updating...
|
||||
foreach(Sidedef s in level.sector.Sidedefs)
|
||||
{
|
||||
if(s.Line.Action == 160 && s.Line.Front != null)
|
||||
|
@ -242,7 +246,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
}
|
||||
//mxd. As well as this sector's geometry
|
||||
// As well as this sector's geometry
|
||||
else if(mode.VisualSectorExists(level.sector))
|
||||
{
|
||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
|
|
|
@ -198,7 +198,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
private void UpdateSkyRenderFlag()
|
||||
protected override void UpdateSkyRenderFlag()
|
||||
{
|
||||
bool isrenderedassky = renderassky;
|
||||
renderassky = (level.sector.CeilTexture == General.Map.Config.SkyFlatName);
|
||||
|
@ -210,6 +210,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
VisualSidedefParts parts = Sector.GetSidedefParts(side);
|
||||
if(parts.upper != null) parts.upper.UpdateSkyRenderFlag();
|
||||
else if(parts.middlesingle != null) parts.middlesingle.UpdateSkyRenderFlag();
|
||||
|
||||
// On the other side as well...
|
||||
if(side.Other != null && side.Other.Sector != null &&
|
||||
side.Other.Sector.CeilTexture == General.Map.Config.SkyFlatName)
|
||||
{
|
||||
BaseVisualSector other = (BaseVisualSector)mode.GetVisualSector(side.Other.Sector);
|
||||
if(other != null && other.Sides != null)
|
||||
{
|
||||
parts = other.GetSidedefParts(side.Other);
|
||||
if(parts.upper != null) parts.upper.UpdateSkyRenderFlag();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
|
||||
//mxd
|
||||
private void UpdateSkyRenderFlag()
|
||||
protected override void UpdateSkyRenderFlag()
|
||||
{
|
||||
bool isrenderedassky = renderassky;
|
||||
renderassky = (level.sector.FloorTexture == General.Map.Config.SkyFlatName || level.sector.LongFloorTexture == MapSet.EmptyLongName);
|
||||
|
|
Loading…
Reference in a new issue