aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvopartgroup.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:56 -0500
committerJacek Antonelli2008-08-15 23:44:56 -0500
commitc07901e29ed545bbb02e3bddf148fe1104b94e9f (patch)
treef1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/newview/llvopartgroup.cpp
parentSecond Life viewer sources 1.15.0.2 (diff)
downloadmeta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2
meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz
Second Life viewer sources 1.15.1.3
Diffstat (limited to 'linden/indra/newview/llvopartgroup.cpp')
-rw-r--r--linden/indra/newview/llvopartgroup.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp
index 28aeb29..fbf753a 100644
--- a/linden/indra/newview/llvopartgroup.cpp
+++ b/linden/indra/newview/llvopartgroup.cpp
@@ -151,7 +151,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
151 151
152 if (!num_parts) 152 if (!num_parts)
153 { 153 {
154 if (drawable->getNumFaces()) 154 if (group && drawable->getNumFaces())
155 { 155 {
156 group->dirtyGeom(); 156 group->dirtyGeom();
157 } 157 }
@@ -206,6 +206,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
206 count++; 206 count++;
207 207
208 facep = drawable->getFace(i); 208 facep = drawable->getFace(i);
209 if (!facep)
210 {
211 llwarns << "No face found for index " << i << "!" << llendl;
212 continue;
213 }
214
209 facep->setTEOffset(i); 215 facep->setTEOffset(i);
210 const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera 216 const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera
211 const F32 MIN_PART_AREA = .005f*.005f; // only less than 5 mm x 5 mm at 1 m from camera 217 const F32 MIN_PART_AREA = .005f*.005f; // only less than 5 mm x 5 mm at 1 m from camera
@@ -259,6 +265,11 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
259 for (i = count; i < drawable->getNumFaces(); i++) 265 for (i = count; i < drawable->getNumFaces(); i++)
260 { 266 {
261 LLFace* facep = drawable->getFace(i); 267 LLFace* facep = drawable->getFace(i);
268 if (!facep)
269 {
270 llwarns << "No face found for index " << i << "!" << llendl;
271 continue;
272 }
262 facep->setTEOffset(i); 273 facep->setTEOffset(i);
263 facep->setSize(0,0); 274 facep->setSize(0,0);
264 } 275 }