diff options
Diffstat (limited to 'linden/indra/newview/llvopartgroup.cpp')
-rw-r--r-- | linden/indra/newview/llvopartgroup.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp index 7d1fec4..11d7341 100644 --- a/linden/indra/newview/llvopartgroup.cpp +++ b/linden/indra/newview/llvopartgroup.cpp | |||
@@ -180,14 +180,13 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) | |||
180 | pixel_meter_ratio *= pixel_meter_ratio; | 180 | pixel_meter_ratio *= pixel_meter_ratio; |
181 | 181 | ||
182 | S32 count=0; | 182 | S32 count=0; |
183 | S32 i; | ||
184 | mDepth = 0.f; | 183 | mDepth = 0.f; |
185 | 184 | S32 i = 0 ; | |
186 | for (i = 0; i < num_parts; i++) | 185 | for (i = 0 ; i < (S32)mViewerPartGroupp->mParticles.size(); i++) |
187 | { | 186 | { |
188 | const LLViewerPart &part = *((LLViewerPart*) mViewerPartGroupp->mParticles[i]); | 187 | const LLViewerPart *part = mViewerPartGroupp->mParticles[i]; |
189 | 188 | ||
190 | LLVector3 part_pos_agent(part.mPosAgent); | 189 | LLVector3 part_pos_agent(part->mPosAgent); |
191 | at = part_pos_agent - camera_agent; | 190 | at = part_pos_agent - camera_agent; |
192 | 191 | ||
193 | F32 camera_dist_squared = at.magVecSquared(); | 192 | F32 camera_dist_squared = at.magVecSquared(); |
@@ -196,7 +195,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) | |||
196 | inv_camera_dist_squared = 1.f / camera_dist_squared; | 195 | inv_camera_dist_squared = 1.f / camera_dist_squared; |
197 | else | 196 | else |
198 | inv_camera_dist_squared = 1.f; | 197 | inv_camera_dist_squared = 1.f; |
199 | F32 area = part.mScale.mV[0] * part.mScale.mV[1] * inv_camera_dist_squared; | 198 | F32 area = part->mScale.mV[0] * part->mScale.mV[1] * inv_camera_dist_squared; |
200 | tot_area = llmax(tot_area, area); | 199 | tot_area = llmax(tot_area, area); |
201 | 200 | ||
202 | if (tot_area > max_area) | 201 | if (tot_area > max_area) |
@@ -227,7 +226,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) | |||
227 | 226 | ||
228 | facep->setViewerObject(this); | 227 | facep->setViewerObject(this); |
229 | 228 | ||
230 | if (part.mFlags & LLPartData::LL_PART_EMISSIVE_MASK) | 229 | if (part->mFlags & LLPartData::LL_PART_EMISSIVE_MASK) |
231 | { | 230 | { |
232 | facep->setState(LLFace::FULLBRIGHT); | 231 | facep->setState(LLFace::FULLBRIGHT); |
233 | } | 232 | } |
@@ -236,9 +235,9 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) | |||
236 | facep->clearState(LLFace::FULLBRIGHT); | 235 | facep->clearState(LLFace::FULLBRIGHT); |
237 | } | 236 | } |
238 | 237 | ||
239 | facep->mCenterLocal = part.mPosAgent; | 238 | facep->mCenterLocal = part->mPosAgent; |
240 | facep->setFaceColor(part.mColor); | 239 | facep->setFaceColor(part->mColor); |
241 | facep->setTexture(part.mImagep); | 240 | facep->setTexture(part->mImagep); |
242 | 241 | ||
243 | mPixelArea = tot_area * pixel_meter_ratio; | 242 | mPixelArea = tot_area * pixel_meter_ratio; |
244 | const F32 area_scale = 10.f; // scale area to increase priority a bit | 243 | const F32 area_scale = 10.f; // scale area to increase priority a bit |