aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-04-13 01:24:00 +0200
committerAuke Kok <sofar+github@foo-projects.org>2017-04-13 09:52:48 -0700
commit6f641df8a52ccb84452a289416527e3d1a36621a (patch)
treed569c745462ae12f5ad11b7876ac22c82c120565
parent021e667511658fdafcece72315f0f71bb26c6c68 (diff)
downloadminetest-6f641df8a52ccb84452a289416527e3d1a36621a.tar.gz
minetest-6f641df8a52ccb84452a289416527e3d1a36621a.tar.bz2
minetest-6f641df8a52ccb84452a289416527e3d1a36621a.zip
Only use palette if param_type2 is correct
-rw-r--r--src/nodedef.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 558acafd6..ce3e378a0 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -786,7 +786,10 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
tiledef_special[j].backface_culling, material_type);
}
- palette = tsrc->getPalette(palette_name);
+ if (param_type_2 == CPT2_COLOR ||
+ param_type_2 == CPT2_COLORED_FACEDIR ||
+ param_type_2 == CPT2_COLORED_WALLMOUNTED)
+ palette = tsrc->getPalette(palette_name);
if ((drawtype == NDT_MESH) && (mesh != "")) {
// Meshnode drawtype