mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Fixed missing textures bug on floors when View mode is set to Brightness levels
This commit is contained in:
parent
c7ea37b0a1
commit
fb8df1a204
1 changed files with 24 additions and 17 deletions
|
@ -1198,31 +1198,38 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
|
||||
if((buffer != null) && (s.FlatVertices != null) && (s.FlatVertices.Length > 0))
|
||||
{
|
||||
ImageData img = General.Map.Data.GetFlatImage(longimagename);
|
||||
if(img != null)
|
||||
if(longimagename == 0)
|
||||
{
|
||||
// Texture unknown?
|
||||
if(img is UnknownImage)
|
||||
t = whitetexture.Texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
ImageData img = General.Map.Data.GetFlatImage(longimagename);
|
||||
if(img != null)
|
||||
{
|
||||
General.Map.Data.UnknownTexture3D.CreateTexture();
|
||||
t = General.Map.Data.UnknownTexture3D.Texture;
|
||||
}
|
||||
// Is the texture loaded?
|
||||
else if(img.IsImageLoaded && !img.LoadFailed)
|
||||
{
|
||||
if(img.Texture == null) img.CreateTexture();
|
||||
t = img.Texture;
|
||||
// Texture unknown?
|
||||
if(img is UnknownImage)
|
||||
{
|
||||
General.Map.Data.UnknownTexture3D.CreateTexture();
|
||||
t = General.Map.Data.UnknownTexture3D.Texture;
|
||||
}
|
||||
// Is the texture loaded?
|
||||
else if(img.IsImageLoaded && !img.LoadFailed)
|
||||
{
|
||||
if(img.Texture == null) img.CreateTexture();
|
||||
t = img.Texture;
|
||||
}
|
||||
else
|
||||
{
|
||||
t = whitetexture.Texture;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t = whitetexture.Texture;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t = whitetexture.Texture;
|
||||
}
|
||||
|
||||
|
||||
// Set renderstates for rendering
|
||||
graphics.Shaders.Display2D.Texture1 = t;
|
||||
graphics.Device.SetTexture(0, t);
|
||||
|
|
Loading…
Reference in a new issue