chore(resources): Do not try loading TPC for KotOR lightmaps
This commit is contained in:
parent
f21e1ae0a1
commit
069390ad4c
1 changed files with 10 additions and 7 deletions
|
@ -364,15 +364,18 @@ shared_ptr<Texture> ResourceManager::findTexture(const string &resRef, TextureTy
|
|||
return it->second;
|
||||
}
|
||||
debug("Loading texture " + resRef);
|
||||
|
||||
bool tryTpc = _version == GameVersion::TheSithLords || type != TextureType::Lightmap;
|
||||
shared_ptr<Texture> texture;
|
||||
shared_ptr<ByteArray> tpcData(find(resRef, ResourceType::Texture));
|
||||
|
||||
if (tpcData) {
|
||||
TpcFile tpc(resRef, type);
|
||||
tpc.load(wrap(tpcData));
|
||||
texture = tpc.texture();
|
||||
} else {
|
||||
if (tryTpc) {
|
||||
shared_ptr<ByteArray> tpcData(find(resRef, ResourceType::Texture));
|
||||
if (tpcData) {
|
||||
TpcFile tpc(resRef, type);
|
||||
tpc.load(wrap(tpcData));
|
||||
texture = tpc.texture();
|
||||
}
|
||||
}
|
||||
if (!texture) {
|
||||
shared_ptr<ByteArray> tgaData(find(resRef, ResourceType::Tga));
|
||||
if (tgaData) {
|
||||
TgaFile tga(resRef, type);
|
||||
|
|
Loading…
Reference in a new issue