diff options
author | prep linden <prep@lindenlab.com> | 2011-01-14 15:30:57 -0500 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2011-01-14 15:30:57 -0500 |
commit | eec6071766e6fef7015610b002a9bcb09ce36836 (patch) | |
tree | 4f63bb1629b5295a1de10d1a014b5297a6cf34cc /indra/newview/llviewerobject.cpp | |
parent | a678ff80af6c48d4232c52aa505b633a1fc22663 (diff) | |
parent | 645da31dd70834dd67a854b3775529154e538d7f (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 1209183229..bf550e9c70 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -241,13 +241,12 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mState(0), mMedia(NULL), mClickAction(0), - mObjectCost(0.f), - mLinksetCost(0.f), - mPhysicsCost(0.f), mLinksetPhysicsCost(0.f), mCostStale(true), mPhysicsShapeUnknown(true), - mAttachmentItemID(LLUUID::null) + mAttachmentItemID(LLUUID::null), + mLastUpdateType(OUT_UNKNOWN), + mLastUpdateCached(FALSE) { if (!is_global) { @@ -529,20 +528,23 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list) // This method returns true if the object is over land owned by the // agent. -BOOL LLViewerObject::isOverAgentOwnedLand() const +bool LLViewerObject::isReturnable() { - return mRegionp - && mRegionp->getParcelOverlay() - && mRegionp->getParcelOverlay()->isOwnedSelf(getPositionRegion()); -} + if (isAttachment()) + { + return false; + } + std::vector<LLBBox> boxes; + boxes.push_back(LLBBox(getPositionRegion(), getRotationRegion(), getScale() * -0.5f, getScale() * 0.5f).getAxisAligned()); + for (child_list_t::iterator iter = mChildList.begin(); + iter != mChildList.end(); iter++) + { + LLViewerObject* child = *iter; + boxes.push_back(LLBBox(child->getPositionRegion(), child->getRotationRegion(), child->getScale() * -0.5f, child->getScale() * 0.5f).getAxisAligned()); + } -// This method returns true if the object is over land owned by the -// agent. -BOOL LLViewerObject::isOverGroupOwnedLand() const -{ - return mRegionp - && mRegionp->getParcelOverlay() - && mRegionp->getParcelOverlay()->isOwnedGroup(getPositionRegion()); + return mRegionp + && mRegionp->objectIsReturnable(getPositionRegion(), boxes); } BOOL LLViewerObject::setParent(LLViewerObject* parent) @@ -5598,6 +5600,26 @@ void LLViewerObject::setAttachmentItemID(const LLUUID &id) mAttachmentItemID = id; } +EObjectUpdateType LLViewerObject::getLastUpdateType() const +{ + return mLastUpdateType; +} + +void LLViewerObject::setLastUpdateType(EObjectUpdateType last_update_type) +{ + mLastUpdateType = last_update_type; +} + +BOOL LLViewerObject::getLastUpdateCached() const +{ + return mLastUpdateCached; +} + +void LLViewerObject::setLastUpdateCached(BOOL last_update_cached) +{ + mLastUpdateCached = last_update_cached; +} + const LLUUID &LLViewerObject::extractAttachmentItemID() { LLUUID item_id = LLUUID::null; @@ -5614,7 +5636,6 @@ const LLUUID &LLViewerObject::extractAttachmentItemID() return getAttachmentItemID(); } - //virtual LLVOAvatar* LLViewerObject::getAvatar() const { |