Skip to content

Commit

Permalink
Do not create dummy normalmaps (#4180)
Browse files Browse the repository at this point in the history
fixes #1811
  • Loading branch information
HybridDog authored and nerzhul committed May 19, 2017
1 parent a4a377e commit 3526740
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/client/tile.cpp
Expand Up @@ -1208,17 +1208,17 @@ bool TextureSource::generateImagePart(std::string part_of_name,
#endif
if (image == NULL) {
if (part_of_name != "") {
if (part_of_name.find("_normal.png") == std::string::npos){
errorstream<<"generateImage(): Could not load image \""
<<part_of_name<<"\""<<" while building texture"<<std::endl;
errorstream<<"generateImage(): Creating a dummy"
<<" image for \""<<part_of_name<<"\""<<std::endl;
} else {
infostream<<"generateImage(): Could not load normal map \""
<<part_of_name<<"\""<<std::endl;
infostream<<"generateImage(): Creating a dummy"
<<" normal map for \""<<part_of_name<<"\""<<std::endl;

// Do not create normalmap dummies
if (part_of_name.find("_normal.png") != std::string::npos) {
warningstream << "generateImage(): Could not load normal map \""
<< part_of_name << "\"" << std::endl;
return true;
}

errorstream << "generateImage(): Could not load image \""
<< part_of_name << "\" while building texture; "
"Creating a dummy image" << std::endl;
}

// Just create a dummy image
Expand Down

0 comments on commit 3526740

Please sign in to comment.