summaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index d589c5ec9..57807449e 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -64,6 +64,7 @@ void ContentFeatures::setInventoryTexture(std::string imgname,
imgname += "^[forcesingle";
+ inventory_texture_name = imgname;
inventory_texture = tsrc->getTextureRaw(imgname);
}
@@ -84,6 +85,7 @@ void ContentFeatures::setInventoryTextureCube(std::string top,
imgname_full += left;
imgname_full += "{";
imgname_full += right;
+ inventory_texture_name = imgname_full;
inventory_texture = tsrc->getTextureRaw(imgname_full);
}
#endif
@@ -181,6 +183,10 @@ public:
if(f->special_material2)
f->special_material2->setTexture(0, f->special_atlas->atlas);
}
+ if(f->inventory_texture_name != ""){
+ f->inventory_texture =
+ tsrc->getTextureRaw(f->inventory_texture_name);
+ }
}
#endif
}