From 2087f8444a6766f1dc3922c7a4e6f50fa3a776c4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 9 Aug 2010 19:46:15 -0700 Subject: Load grasses from file the same way as trees --- linden/indra/newview/llvograss.cpp | 6 ++---- linden/indra/newview/llvograss.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp index 8b63163..08f2717 100644 --- a/linden/indra/newview/llvograss.cpp +++ b/linden/indra/newview/llvograss.cpp @@ -108,7 +108,7 @@ void LLVOGrass::updateSpecies() SpeciesMap::const_iterator it = sSpeciesTable.begin(); mSpecies = (*it).first; } - setTEImage(0, gImageList.getImage(sSpeciesTable[mSpecies]->mTextureID)); + setTEImage(0, gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName)); } @@ -167,9 +167,7 @@ void LLVOGrass::initClass() static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name"); success &= grass_def->getFastAttributeString(texture_name_string, textureName); - LLViewerImage* grass_image = gImageList.getImageFromFile(textureName); - newGrass->mTextureID = grass_image->getID(); - + newGrass->mTextureName = textureName; static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x"); success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val); diff --git a/linden/indra/newview/llvograss.h b/linden/indra/newview/llvograss.h index abfc7e1..682fbdb 100644 --- a/linden/indra/newview/llvograss.h +++ b/linden/indra/newview/llvograss.h @@ -96,6 +96,7 @@ public: struct GrassSpeciesData { LLUUID mTextureID; + std::string mTextureName; F32 mBladeSizeX; F32 mBladeSizeY; -- cgit v1.1