- fixed 3D floor texture setup.

This code really makes zero sense, it looks like the cases for upper and lower texture should never be entered ever.
This commit is contained in:
Christoph Oelckers 2018-12-14 01:31:40 +01:00
commit fc5dd17d77

View file

@ -773,13 +773,13 @@ namespace swrenderer
FTexture *ftex = TexMan.GetPalettedTexture(sidedef->GetTexture(side_t::mid), true);
FSoftwareTexture *midtex = ftex && ftex->isValid() ? ftex->GetSoftwareTexture() : nullptr;
bool segtextured = midtex != NULL || mTopPart.Texture != NULL || mBottomPart.Texture != NULL;
bool segtextured = ftex != NULL || mTopPart.Texture != NULL || mBottomPart.Texture != NULL;
// calculate light table
if (needlights && (segtextured || (mBackSector && IsFogBoundary(mFrontSector, mBackSector))))
{
lwallscale =
midtex ? (midtex->GetScale().X * sidedef->GetTextureXScale(side_t::mid)) :
ftex ? ((midtex? midtex->GetScale().X : 1.0) * sidedef->GetTextureXScale(side_t::mid)) :
mTopPart.Texture ? (mTopPart.Texture->GetScale().X * sidedef->GetTextureXScale(side_t::top)) :
mBottomPart.Texture ? (mBottomPart.Texture->GetScale().X * sidedef->GetTextureXScale(side_t::bottom)) :
1.;