summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2007-05-23 21:17:34 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2007-05-23 21:17:34 +0000
commit029130bf9c76139fa836117987b60e801ac7ec7c (patch)
treeee320f7737ad3edc74a2401b5bd20a027b670487 /indra/newview/llface.cpp
parent0aac2f674e4bd2fc73025ec8b649739cf7be3e4c (diff)
svn merge svn+ssh://svn.lindenlab.com/svn/linden/release@62339 svn+ssh://svn.lindenlab.com/svn/linden/branches/release-candidate62341 -> release
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index b96ffa46fe..044ae33ccc 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -706,8 +706,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
- const LLVolumeFace &face = volume.getVolumeFace(f);
-
//get bounding box
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION))
{
@@ -718,9 +716,18 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
}
LLVector3 min,max;
-
- min = face.mExtents[0];
- max = face.mExtents[1];
+
+ if (f >= volume.getNumVolumeFaces())
+ {
+ min = LLVector3(-1,-1,-1);
+ max = LLVector3(1,1,1);
+ }
+ else
+ {
+ const LLVolumeFace &face = volume.getVolumeFace(f);
+ min = face.mExtents[0];
+ max = face.mExtents[1];
+ }
//min, max are in volume space, convert to drawable render space
LLVector3 center = ((min + max) * 0.5f)*mat_vert;
@@ -884,6 +891,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
full_rebuild = TRUE;
}
}
+ else
+ {
+ full_rebuild = TRUE;
+ }
}
else
{