aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:57 -0500
committerJacek Antonelli2008-08-15 23:44:57 -0500
commitda68d3a57ecb27eba5d7efb8ff77d9640c0be65e (patch)
treef2fa2b9ed6e8cf49c8a3cb2a1893c4e5c61916a1 /linden/indra/newview/llface.cpp
parentSecond Life viewer sources 1.15.1.3 (diff)
downloadmeta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.zip
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.gz
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.bz2
meta-impy-da68d3a57ecb27eba5d7efb8ff77d9640c0be65e.tar.xz
Second Life viewer sources 1.16.0.5
Diffstat (limited to 'linden/indra/newview/llface.cpp')
-rw-r--r--linden/indra/newview/llface.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp
index 3b47e21..342c76e 100644
--- a/linden/indra/newview/llface.cpp
+++ b/linden/indra/newview/llface.cpp
@@ -726,8 +726,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
726{ 726{
727 LLMemType mt1(LLMemType::MTYPE_DRAWABLE); 727 LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
728 728
729 const LLVolumeFace &face = volume.getVolumeFace(f);
730
731 //get bounding box 729 //get bounding box
732 if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION)) 730 if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION))
733 { 731 {
@@ -738,9 +736,18 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
738 } 736 }
739 737
740 LLVector3 min,max; 738 LLVector3 min,max;
741 739
742 min = face.mExtents[0]; 740 if (f >= volume.getNumVolumeFaces())
743 max = face.mExtents[1]; 741 {
742 min = LLVector3(-1,-1,-1);
743 max = LLVector3(1,1,1);
744 }
745 else
746 {
747 const LLVolumeFace &face = volume.getVolumeFace(f);
748 min = face.mExtents[0];
749 max = face.mExtents[1];
750 }
744 751
745 //min, max are in volume space, convert to drawable render space 752 //min, max are in volume space, convert to drawable render space
746 LLVector3 center = ((min + max) * 0.5f)*mat_vert; 753 LLVector3 center = ((min + max) * 0.5f)*mat_vert;
@@ -904,6 +911,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
904 full_rebuild = TRUE; 911 full_rebuild = TRUE;
905 } 912 }
906 } 913 }
914 else
915 {
916 full_rebuild = TRUE;
917 }
907 } 918 }
908 else 919 else
909 { 920 {