diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-06-14 23:14:14 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-06-14 23:14:14 -0500 |
| commit | 1b7b8aa00ea4329243125a1c53c90115ff7d6bfa (patch) | |
| tree | 5ef154c052e043dbc500c034b4d718c5568643d2 /indra/newview/llviewerobject.cpp | |
| parent | 37a8c12bd34b2bd119b50f32d6e081ab59d1f5c4 (diff) | |
| parent | 6e37ec08f678451a526f34218cb070d117cdf60a (diff) | |
merge
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1e226ebb65..03e524268d 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -232,6 +232,9 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mState(0), mMedia(NULL), mClickAction(0), + mObjectCost(0.f), + mLinksetCost(0.f), + mCostStale(true), mAttachmentItemID(LLUUID::null) { if (!is_global) @@ -828,6 +831,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE llinfos << "Full:" << getID() << llendl; #endif + //clear cost and linkset cost + mCostStale = true; + LLUUID audio_uuid; LLUUID owner_id; // only valid if audio_uuid or particle system is not null F32 gain; @@ -1393,6 +1399,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE llinfos << "CompFull:" << getID() << llendl; #endif + mCostStale = true; + dp->unpackU32(crc, "CRC"); mTotalCRC = crc; dp->unpackU8(material, "Material"); @@ -2863,6 +2871,41 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) } } +void LLViewerObject::setObjectCost(F32 cost) +{ + mObjectCost = cost; + mCostStale = false; +} + +void LLViewerObject::setLinksetCost(F32 cost) +{ + mLinksetCost = cost; + mCostStale = false; +} + + +F32 LLViewerObject::getObjectCost() +{ + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mObjectCost; +} + +F32 LLViewerObject::getLinksetCost() +{ + if (mCostStale) + { + gObjectList.updateObjectCost(this); + } + + return mLinksetCost; +} + + + void LLViewerObject::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) { LLVector4a center; @@ -4983,7 +5026,7 @@ void LLViewerObject::updateFlags() if (getPhysicsShapeType() != 0) { - llwarns << "sent non default physics rep" << llendl; + llwarns << "sent non default physics rep " << (S32) getPhysicsShapeType() << llendl; } } |
