Skip to content

Commit

Permalink
Skip lookup of .jpeg textures
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeckebans committed Jan 18, 2022
1 parent a08d278 commit 33fe82e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

***This is still very much Work in Progress and not supported by the official TrenchBroom yet.***

<img src="https://i.imgur.com/wPPYvE3.jpg">
<img src="https://i.imgur.com/3sUxOZi.jpg">

<img src="https://i.imgur.com/3g3Qmf4.jpg">

Expand Down
6 changes: 3 additions & 3 deletions common/src/IO/Quake3ShaderTextureReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ Path Quake3ShaderTextureReader::findTexturePath(const Assets::Quake3Shader& shad
Path Quake3ShaderTextureReader::findTexture(const Path& texturePath) const {
if (
!texturePath.isEmpty() && (texturePath.extension().empty() || !m_fs.fileExists(texturePath))) {
const auto candidates = m_fs.findItemsWithBaseName(
texturePath, std::vector<std::string>{"tga", "png", "jpg", "jpeg"});
const auto candidates =
m_fs.findItemsWithBaseName(texturePath, std::vector<std::string>{"tga", "png", "jpg"});
if (!candidates.empty()) {
return candidates.front();
} else {
Expand All @@ -136,7 +136,7 @@ Path Quake3ShaderTextureReader::findTexture(const Path& texturePath) const {
altPath = altPath + texturePath;

const auto candidates =
m_fs.findItemsWithBaseName(altPath, std::vector<std::string>{"tga", "png", "jpg", "jpeg"});
m_fs.findItemsWithBaseName(altPath, std::vector<std::string>{"tga", "png", "jpg"});
if (!candidates.empty()) {
return candidates.front();
} else {
Expand Down

0 comments on commit 33fe82e

Please sign in to comment.