- fixed: FTexture::SmoothEdges must forward its result to the base texture in case a redirection is in effect.

Both need the bMasked flag, or some code will think that the texture is not fully opaque if no holes were found.
This commit is contained in:
Christoph Oelckers 2018-11-17 18:55:44 +01:00
parent 08fe9c375b
commit 45ef7bca4f
2 changed files with 6 additions and 1 deletions

View file

@ -76,7 +76,7 @@ public:
} }
bool isMasked() const bool isMasked() const
{ {
return !!sourcetex->bMasked; return sourcetex->bMasked;
} }
bool isExpanded() const bool isExpanded() const
{ {

View file

@ -1351,6 +1351,11 @@ bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch)
if (bMasked) if (bMasked)
{ {
bMasked = SmoothEdges(buffer, w, h); bMasked = SmoothEdges(buffer, w, h);
if (!bMasked)
{
auto stex = GetRedirect();
stex->bMasked = false; // also clear in the base texture if there is a redirection.
}
if (bMasked && !ispatch) FindHoles(buffer, w, h); if (bMasked && !ispatch) FindHoles(buffer, w, h);
} }
return true; return true;