Merged in GZDB r2467.

This commit is contained in:
MascaraSnake 2016-01-23 01:36:59 +01:00
parent 431a6ea0ec
commit af2a941cf7
3 changed files with 24 additions and 8 deletions

View File

@ -95,7 +95,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This changes the height
protected abstract void ChangeHeight(int amount);
protected abstract void ChangeTextureScale(int incrementX, int incrementY); //mxd
public virtual void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //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
protected static void SwapTriangleVertices(WorldVertex[] verts)
@ -218,14 +219,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd
protected void OnTextureChanged()
{
//mxd. Effects may need updating...
//Effects may need updating...
mode.RebuildElementData();
if(level.sector == this.Sector.Sector)
// 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)
{
// MascaraSnake: 3D floor handling
@ -244,7 +248,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);

View File

@ -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();
}
}
}
}
}

View File

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