- make sure that incomplete multipatch textures are technically complete.

They need a valid FTexture backing them and should have their name cleared so that nothing references them by accident.
This commit is contained in:
Christoph Oelckers 2020-06-02 20:15:55 +02:00
commit 8f07ab87c8
2 changed files with 4 additions and 1 deletions

View file

@ -104,7 +104,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
for (int i = 1; i < TexMan.NumTextures(); i++)
{
auto gametex = TexMan.GameByIndex(i);
if (gametex &&
if (gametex && gametex->isValid() &&
gametex->GetTexture()->GetImage() && // only image textures are subject to precaching
gametex->GetUseType() != ETextureType::FontChar && // We do not want to delete font characters here as they are very likely to be needed constantly.
gametex->GetUseType() < ETextureType::Special) // Any texture marked as 'special' is also out.