Update inventory texture too

This commit is contained in:
Perttu Ahola 2011-11-15 13:22:29 +02:00
parent 01ae0daea5
commit c1202a2ecc
2 changed files with 7 additions and 0 deletions

@ -64,6 +64,7 @@ void ContentFeatures::setInventoryTexture(std::string imgname,
imgname += "^[forcesingle"; imgname += "^[forcesingle";
inventory_texture_name = imgname;
inventory_texture = tsrc->getTextureRaw(imgname); inventory_texture = tsrc->getTextureRaw(imgname);
} }
@ -84,6 +85,7 @@ void ContentFeatures::setInventoryTextureCube(std::string top,
imgname_full += left; imgname_full += left;
imgname_full += "{"; imgname_full += "{";
imgname_full += right; imgname_full += right;
inventory_texture_name = imgname_full;
inventory_texture = tsrc->getTextureRaw(imgname_full); inventory_texture = tsrc->getTextureRaw(imgname_full);
} }
#endif #endif
@ -181,6 +183,10 @@ public:
if(f->special_material2) if(f->special_material2)
f->special_material2->setTexture(0, f->special_atlas->atlas); f->special_material2->setTexture(0, f->special_atlas->atlas);
} }
if(f->inventory_texture_name != ""){
f->inventory_texture =
tsrc->getTextureRaw(f->inventory_texture_name);
}
} }
#endif #endif
} }

@ -113,6 +113,7 @@ struct ContentFeatures
*/ */
TileSpec tiles[6]; TileSpec tiles[6];
std::string inventory_texture_name;
video::ITexture *inventory_texture; video::ITexture *inventory_texture;
// Used currently for flowing liquids // Used currently for flowing liquids