aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvograss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llvograss.cpp')
-rw-r--r--linden/indra/newview/llvograss.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp
index d0a36b0..8b63163 100644
--- a/linden/indra/newview/llvograss.cpp
+++ b/linden/indra/newview/llvograss.cpp
@@ -163,19 +163,13 @@ void LLVOGrass::initClass()
163 GrassSpeciesData* newGrass = new GrassSpeciesData(); 163 GrassSpeciesData* newGrass = new GrassSpeciesData();
164 164
165 165
166 static LLStdStringHandle texture_id_string = LLXmlTree::addAttributeString("texture_id"); 166 std::string textureName;
167 grass_def->getFastAttributeUUID(texture_id_string, id);
168 newGrass->mTextureID = id;
169 167
170 if (newGrass->mTextureID.isNull()) 168 static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name");
171 { 169 success &= grass_def->getFastAttributeString(texture_name_string, textureName);
172 std::string textureName; 170 LLViewerImage* grass_image = gImageList.getImageFromFile(textureName);
171 newGrass->mTextureID = grass_image->getID();
173 172
174 static LLStdStringHandle texture_name_string = LLXmlTree::addAttributeString("texture_name");
175 success &= grass_def->getFastAttributeString(texture_name_string, textureName);
176 LLViewerImage* grass_image = gImageList.getImageFromFile(textureName);
177 newGrass->mTextureID = grass_image->getID();
178 }
179 173
180 static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x"); 174 static LLStdStringHandle blade_sizex_string = LLXmlTree::addAttributeString("blade_size_x");
181 success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val); 175 success &= grass_def->getFastAttributeF32(blade_sizex_string, F32_val);