diff options
author | McCabe Maxsted | 2010-08-09 19:46:15 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-08-09 19:46:15 -0700 |
commit | 2087f8444a6766f1dc3922c7a4e6f50fa3a776c4 (patch) | |
tree | 0add4d99cb2266af1e3b0d4b5706f66134e5437e /linden | |
parent | load trees and grass always from file (diff) | |
download | meta-impy-2087f8444a6766f1dc3922c7a4e6f50fa3a776c4.zip meta-impy-2087f8444a6766f1dc3922c7a4e6f50fa3a776c4.tar.gz meta-impy-2087f8444a6766f1dc3922c7a4e6f50fa3a776c4.tar.bz2 meta-impy-2087f8444a6766f1dc3922c7a4e6f50fa3a776c4.tar.xz |
Load grasses from file the same way as trees
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/llvograss.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llvograss.h | 1 |
2 files changed, 3 insertions, 4 deletions
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() | |||
108 | SpeciesMap::const_iterator it = sSpeciesTable.begin(); | 108 | SpeciesMap::const_iterator it = sSpeciesTable.begin(); |
109 | mSpecies = (*it).first; | 109 | mSpecies = (*it).first; |
110 | } | 110 | } |
111 | setTEImage(0, gImageList.getImage(sSpeciesTable[mSpecies]->mTextureID)); | 111 | setTEImage(0, gImageList.getImageFromFile(sSpeciesTable[mSpecies]->mTextureName)); |
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
@@ -167,9 +167,7 @@ void LLVOGrass::initClass() | |||
167 | 167 | ||
168 | static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name"); | 168 | static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name"); |
169 | success &= grass_def->getFastAttributeString(texture_name_string, textureName); | 169 | success &= grass_def->getFastAttributeString(texture_name_string, textureName); |
170 | LLViewerImage* grass_image = gImageList.getImageFromFile(textureName); | 170 | newGrass->mTextureName = textureName; |
171 | newGrass->mTextureID = grass_image->getID(); | ||
172 | |||
173 | 171 | ||
174 | static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x"); | 172 | static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x"); |
175 | success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val); | 173 | 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: | |||
96 | struct GrassSpeciesData | 96 | struct GrassSpeciesData |
97 | { | 97 | { |
98 | LLUUID mTextureID; | 98 | LLUUID mTextureID; |
99 | std::string mTextureName; | ||
99 | 100 | ||
100 | F32 mBladeSizeX; | 101 | F32 mBladeSizeX; |
101 | F32 mBladeSizeY; | 102 | F32 mBladeSizeY; |