aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llflexibleobject.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:44 -0500
committerJacek Antonelli2008-08-15 23:45:44 -0500
commitacfdcf2b1deeb04698174c78e8cb22b093445bb1 (patch)
tree811293650bcf81d01ea7c54d7c2cf263110aa329 /linden/indra/newview/llflexibleobject.cpp
parentSecond Life viewer sources 1.20.2 (diff)
downloadmeta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.zip
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.gz
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.bz2
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.xz
Second Life viewer sources 1.20.3
Diffstat (limited to 'linden/indra/newview/llflexibleobject.cpp')
-rw-r--r--linden/indra/newview/llflexibleobject.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp
index fe7fafa..ec49c1a 100644
--- a/linden/indra/newview/llflexibleobject.cpp
+++ b/linden/indra/newview/llflexibleobject.cpp
@@ -195,7 +195,7 @@ void LLVolumeImplFlexible::remapSections(LLFlexibleObjectSection *source, S32 so
195 195
196 196
197//----------------------------------------------------------------------------- 197//-----------------------------------------------------------------------------
198void LLVolumeImplFlexible::setAttributesOfAllSections() 198void LLVolumeImplFlexible::setAttributesOfAllSections(LLVector3* inScale)
199{ 199{
200 LLVector2 bottom_scale, top_scale; 200 LLVector2 bottom_scale, top_scale;
201 F32 begin_rot = 0, end_rot = 0; 201 F32 begin_rot = 0, end_rot = 0;
@@ -215,8 +215,16 @@ void LLVolumeImplFlexible::setAttributesOfAllSections()
215 215
216 S32 num_sections = 1 << mSimulateRes; 216 S32 num_sections = 1 << mSimulateRes;
217 217
218 LLVector3 scale = mVO->mDrawable->getScale(); 218 LLVector3 scale;
219 219 if (inScale == (LLVector3*)NULL)
220 {
221 scale = mVO->mDrawable->getScale();
222 }
223 else
224 {
225 scale = *inScale;
226 }
227
220 mSection[0].mPosition = getAnchorPosition(); 228 mSection[0].mPosition = getAnchorPosition();
221 mSection[0].mDirection = LLVector3::z_axis * getFrameRotation(); 229 mSection[0].mDirection = LLVector3::z_axis * getFrameRotation();
222 mSection[0].mdPosition = mSection[0].mDirection; 230 mSection[0].mdPosition = mSection[0].mDirection;
@@ -297,7 +305,7 @@ BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F6
297 new_res = mRenderRes; 305 new_res = mRenderRes;
298 } 306 }
299 307
300 if (!mInitialized || (mSimulateRes != new_res)) 308 if (!mInitialized)
301 { 309 {
302 mSimulateRes = new_res; 310 mSimulateRes = new_res;
303 setAttributesOfAllSections(); 311 setAttributesOfAllSections();
@@ -644,7 +652,7 @@ void LLVolumeImplFlexible::doFlexibleRebuild()
644 652
645void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) 653void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped)
646{ 654{
647 setAttributesOfAllSections(); 655 setAttributesOfAllSections((LLVector3*) &scale);
648} 656}
649 657
650BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) 658BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)