diff options
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 8930b2453b..7871815fda 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -418,6 +418,7 @@ void LLViewerObject::markDead() { if (!mDead) { + LL_PROFILE_ZONE_SCOPED; //LL_INFOS() << "Marking self " << mLocalID << " as dead." << LL_ENDL; // Root object of this hierarchy unlinks itself. @@ -1153,6 +1154,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, const EObjectUpdateType update_type, LLDataPacker *dp) { + LL_PROFILE_ZONE_SCOPED; LL_DEBUGS_ONCE("SceneLoadTiming") << "Received viewer object data" << LL_ENDL; LL_DEBUGS("ObjectUpdate") << " mesgsys " << mesgsys << " dp " << dp << " id " << getID() << " update_type " << (S32) update_type << LL_ENDL; @@ -1269,7 +1271,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, LL_INFOS() << "Full:" << getID() << LL_ENDL; #endif //clear cost and linkset cost - mCostStale = true; + setObjectCostStale(); if (isSelected()) { gFloaterTools->dirty(); @@ -1825,7 +1827,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE LL_INFOS() << "CompFull:" << getID() << LL_ENDL; #endif - mCostStale = true; + setObjectCostStale(); if (isSelected()) { @@ -3779,6 +3781,16 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) } } +void LLViewerObject::setObjectCostStale() +{ + mCostStale = true; + // *NOTE: This is harmlessly redundant for Blinn-Phong material updates, as + // the root prim currently gets set stale anyway due to other property + // updates. But it is needed for GLTF material ID updates. + // -Cosmic,2023-06-27 + getRootEdit()->mCostStale = true; +} + void LLViewerObject::setObjectCost(F32 cost) { mObjectCost = cost; @@ -6818,7 +6830,7 @@ void LLViewerObject::setPhysicsShapeType(U8 type) if (type != mPhysicsShapeType) { mPhysicsShapeType = type; - mCostStale = true; + setObjectCostStale(); } } @@ -7325,6 +7337,12 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat LLGLTFMaterialList::queueApply(this, te, id); } } + + if (!update_server) + { + // Land impact may have changed + setObjectCostStale(); + } } void LLViewerObject::setRenderMaterialIDs(const LLUUID& id) |