Visual Mode: fixed inaccuracies of when upper/lower textures are shown when sky rendering is enabled

This commit is contained in:
biwa 2021-03-17 20:04:10 +01:00
parent a99d5c239b
commit 8e95b074ec
2 changed files with 14 additions and 3 deletions

View file

@ -92,6 +92,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
return false;
}
// Apply sky hack?
UpdateSkyRenderFlag();
//mxd. lightfog flag support
int lightvalue;
bool lightabsolute;
@ -233,6 +236,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
base.SetVertices(null); //mxd
return false;
}
internal void UpdateSkyRenderFlag()
{
renderassky = (Sidedef.Other != null && Sidedef.Sector != null && Sidedef.Other.Sector != null
&& Sidedef.Other.Sector.FloorTexture == General.Map.Config.SkyFlatName
&& Sidedef.LowTexture == "-");
}
#endregion

View file

@ -226,9 +226,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd
internal void UpdateSkyRenderFlag()
{
renderassky = (Sidedef.Other != null && Sidedef.Sector != null && Sidedef.Other.Sector != null
&& Sidedef.Sector.CeilTexture == General.Map.Config.SkyFlatName
&& Sidedef.Other.Sector.CeilTexture == General.Map.Config.SkyFlatName);
renderassky = (Sidedef.Other != null && Sidedef.Sector != null && Sidedef.Other.Sector != null
&& Sidedef.Other.Sector.CeilTexture == General.Map.Config.SkyFlatName
&& (Sidedef.Sector.CeilTexture == General.Map.Config.SkyFlatName || Sidedef.HighTexture == "-")
);
}
#endregion