mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- 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:
parent
8480a390a1
commit
8f07ab87c8
2 changed files with 4 additions and 1 deletions
|
@ -923,7 +923,10 @@ void FMultipatchTextureBuilder::ResolveAllPatches()
|
||||||
for (auto &b : BuiltTextures)
|
for (auto &b : BuiltTextures)
|
||||||
{
|
{
|
||||||
Printf("%s\n", b.Name.GetChars());
|
Printf("%s\n", b.Name.GetChars());
|
||||||
|
// make it hard to find but also ensure that it references valid backing data.
|
||||||
b.texture->SetUseType(ETextureType::Null);
|
b.texture->SetUseType(ETextureType::Null);
|
||||||
|
b.texture->SetBase(TexMan.GameByIndex(0)->GetTexture());
|
||||||
|
b.texture->SetName("");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
|
||||||
for (int i = 1; i < TexMan.NumTextures(); i++)
|
for (int i = 1; i < TexMan.NumTextures(); i++)
|
||||||
{
|
{
|
||||||
auto gametex = TexMan.GameByIndex(i);
|
auto gametex = TexMan.GameByIndex(i);
|
||||||
if (gametex &&
|
if (gametex && gametex->isValid() &&
|
||||||
gametex->GetTexture()->GetImage() && // only image textures are subject to precaching
|
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::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.
|
gametex->GetUseType() < ETextureType::Special) // Any texture marked as 'special' is also out.
|
||||||
|
|
Loading…
Reference in a new issue