aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llvotree.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-05-24 02:59:24 -0500
committerJacek Antonelli2009-05-24 02:59:40 -0500
commitb2627d927f1642bea84b92adfccd9403676e1341 (patch)
tree07f069e63cfa633b9bd0d07b4eecc229ef67f974 /linden/indra/newview/llvotree.cpp
parentSecond Life viewer sources 1.23.1-RC (diff)
downloadmeta-impy-b2627d927f1642bea84b92adfccd9403676e1341.zip
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.gz
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.bz2
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.xz
Second Life viewer sources 1.23.2-RC
Diffstat (limited to 'linden/indra/newview/llvotree.cpp')
-rw-r--r--linden/indra/newview/llvotree.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/linden/indra/newview/llvotree.cpp b/linden/indra/newview/llvotree.cpp
index 3b76127..3fd5054 100644
--- a/linden/indra/newview/llvotree.cpp
+++ b/linden/indra/newview/llvotree.cpp
@@ -329,6 +329,9 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
329 mBillboardRatio = sSpeciesTable[mSpecies]->mBillboardRatio; 329 mBillboardRatio = sSpeciesTable[mSpecies]->mBillboardRatio;
330 mTrunkAspect = sSpeciesTable[mSpecies]->mTrunkAspect; 330 mTrunkAspect = sSpeciesTable[mSpecies]->mTrunkAspect;
331 mBranchAspect = sSpeciesTable[mSpecies]->mBranchAspect; 331 mBranchAspect = sSpeciesTable[mSpecies]->mBranchAspect;
332
333 // position change not caused by us, etc. make sure to rebuild.
334 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);
332 335
333 return retval; 336 return retval;
334} 337}
@@ -397,6 +400,31 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
397 { 400 {
398 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE); 401 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE);
399 } 402 }
403 else
404 {
405 // we're not animating but we may *still* need to
406 // regenerate the mesh if we moved, since position
407 // and rotation are baked into the mesh.
408 // *TODO: I don't know what's so special about trees
409 // that they don't get REBUILD_POSITION automatically
410 // at a higher level.
411 const LLVector3 &this_position = getPositionAgent();
412 if (this_position != mLastPosition)
413 {
414 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
415 mLastPosition = this_position;
416 }
417 else
418 {
419 const LLQuaternion &this_rotation = getRotation();
420
421 if (this_rotation != mLastRotation)
422 {
423 gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
424 mLastRotation = this_rotation;
425 }
426 }
427 }
400 } 428 }
401 429
402 mTrunkLOD = trunk_LOD; 430 mTrunkLOD = trunk_LOD;