diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-10-05 13:01:57 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-10-05 13:01:57 -0700 |
commit | 7ffa6ba854392d5c37de8631c7f35edeed375a58 (patch) | |
tree | 8ca3d2ff39b8ec870ebdf264bf7a26a67f7df624 /indra/newview/llviewerobject.cpp | |
parent | ba60e0906549840b8632d72f17b3f9bcda65e882 (diff) | |
parent | e61da057397f95e0dcf8bf964e2836d3d4a80c20 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index cd71b6d42a..d81e67bfe2 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,7 +100,6 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" -#include "llaccountingquota.h" //#define DEBUG_UPDATE_TYPE @@ -140,6 +139,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco if (!gAgentAvatarp) { gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp); + gAgentAvatarp->initInstance(); } else { @@ -149,9 +149,10 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco } else { - res = new LLVOAvatar(id, pcode, regionp); + LLVOAvatar *avatar = new LLVOAvatar(id, pcode, regionp); + avatar->initInstance(); + res = avatar; } - static_cast<LLVOAvatar*>(res)->initInstance(); break; } case LL_PCODE_LEGACY_GRASS: @@ -628,6 +629,20 @@ void LLViewerObject::constructAndAddReturnable( std::vector<PotentialReturnableO } } +bool LLViewerObject::crossesParcelBounds() +{ + 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()); + } + + return mRegionp && mRegionp->objectsCrossParcel(boxes); +} + BOOL LLViewerObject::setParent(LLViewerObject* parent) { if(mParent != parent) @@ -5785,9 +5800,3 @@ public: LLHTTPRegistration<ObjectPhysicsProperties> gHTTPRegistrationObjectPhysicsProperties("/message/ObjectPhysicsProperties"); - -void LLViewerObject::updateQuota( const SelectionQuota& quota ) -{ - //update quotas - mSelectionQuota = quota; -} |