Skip to content

Commit 3526740

Browse files
HybridDognerzhul
authored andcommittedMay 19, 2017
Do not create dummy normalmaps (#4180)
fixes #1811
1 parent a4a377e commit 3526740

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎src/client/tile.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -1208,17 +1208,17 @@ bool TextureSource::generateImagePart(std::string part_of_name,
12081208
#endif
12091209
if (image == NULL) {
12101210
if (part_of_name != "") {
1211-
if (part_of_name.find("_normal.png") == std::string::npos){
1212-
errorstream<<"generateImage(): Could not load image \""
1213-
<<part_of_name<<"\""<<" while building texture"<<std::endl;
1214-
errorstream<<"generateImage(): Creating a dummy"
1215-
<<" image for \""<<part_of_name<<"\""<<std::endl;
1216-
} else {
1217-
infostream<<"generateImage(): Could not load normal map \""
1218-
<<part_of_name<<"\""<<std::endl;
1219-
infostream<<"generateImage(): Creating a dummy"
1220-
<<" normal map for \""<<part_of_name<<"\""<<std::endl;
1211+
1212+
// Do not create normalmap dummies
1213+
if (part_of_name.find("_normal.png") != std::string::npos) {
1214+
warningstream << "generateImage(): Could not load normal map \""
1215+
<< part_of_name << "\"" << std::endl;
1216+
return true;
12211217
}
1218+
1219+
errorstream << "generateImage(): Could not load image \""
1220+
<< part_of_name << "\" while building texture; "
1221+
"Creating a dummy image" << std::endl;
12221222
}
12231223

12241224
// Just create a dummy image

0 commit comments

Comments
 (0)
Please sign in to comment.