diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-11-25 22:34:59 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-11-25 22:34:59 +0200 |
| commit | a58abdac5fd642ee320345bd1eef0df253895dba (patch) | |
| tree | c71007ccb2746b7bef7949c2c978cbfe768392ce /indra/newview/lldrawable.cpp | |
| parent | 624eaf59a02dbd2f002fb45af01bbc17f04f8331 (diff) | |
| parent | 9fe788e031e83aa6bfbb7bc9144079d2814018e8 (diff) | |
Merge branch develop into project/fonts-update
# Conflicts:
# indra/llrender/llfontfreetype.cpp
Diffstat (limited to 'indra/newview/lldrawable.cpp')
| -rw-r--r-- | indra/newview/lldrawable.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 70ae4ee13f..322ee90541 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -33,6 +33,7 @@ // viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llcriticaldamp.h" #include "llface.h" #include "lllightconstants.h" @@ -252,7 +253,15 @@ void LLDrawable::cleanupReferences() std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); mFaces.clear(); - gPipeline.unlinkDrawable(this); + if (gPipeline.mInitialized) + { + gPipeline.unlinkDrawable(this); + } + else if (getSpatialGroup()) + { + // Not supposed to happen? + getSpatialGroup()->getSpatialPartition()->remove(this, getSpatialGroup()); + } removeFromOctree(); @@ -778,6 +787,14 @@ bool LLDrawable::updateMove() makeActive(); + // #3256 force undampened movement for attached objects in mouselook + // to prevent animation bork for linkset with animated parts + if (!isRoot() && gAgentCamera.cameraMouselook() && + !mVObjp->isRiggedMesh() && mVObjp->getAvatar() && mVObjp->getAvatar()->isSelf()) + { + return updateMoveUndamped(); + } + return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped(); } @@ -908,7 +925,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin(); LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box); mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f)); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } return; } } @@ -919,7 +939,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update) pos -= camera.getOrigin(); mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f); - mVObjp->updateLOD(); + if (mVObjp) + { + mVObjp->updateLOD(); + } } } @@ -931,6 +954,11 @@ void LLDrawable::updateTexture() return; } + if (!mVObjp) + { + return; + } + if (getNumFaces() != mVObjp->getNumTEs()) { //drawable is transitioning its face count return; |
