diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-15 13:22:29 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:43 +0200 |
commit | c1202a2ecca352d5491364877fbe11e509cda8d3 (patch) | |
tree | c009bd8bc9f5f3638c28432146bf83f8dcc6975b | |
parent | 01ae0daea501f47ec56a8368e530cb4176fc44cd (diff) | |
download | minetest-c1202a2ecca352d5491364877fbe11e509cda8d3.tar.gz minetest-c1202a2ecca352d5491364877fbe11e509cda8d3.tar.bz2 minetest-c1202a2ecca352d5491364877fbe11e509cda8d3.zip |
Update inventory texture too
-rw-r--r-- | src/nodedef.cpp | 6 | ||||
-rw-r--r-- | src/nodedef.h | 1 |
2 files changed, 7 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 } diff --git a/src/nodedef.h b/src/nodedef.h index 0430621e7..a093cb799 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -113,6 +113,7 @@ struct ContentFeatures */ TileSpec tiles[6]; + std::string inventory_texture_name; video::ITexture *inventory_texture; // Used currently for flowing liquids |