summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-04 09:17:26 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-04 09:17:26 +0100
commit722c8af1121f3edbcef6c5478c31339177fac802 (patch)
tree10eb16a768057a7d175203fa82e6caf0c816492f /indra/newview/llviewerobject.cpp
parent29e98032d1ad86686bee0fd58c65f95d1aeba439 (diff)
parenteb283701afc7ecbe3009a9fb75be1dcb222a383b (diff)
merge
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 6bd3ceb8a8..3aecd0175d 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5219,6 +5219,25 @@ void LLViewerObject::resetChildrenPosition(const LLVector3& offset, BOOL simplif
return ;
}
+//virtual
+LLVOAvatar* LLViewerObject::getAvatar() const
+{
+ if (isAttachment())
+ {
+ LLViewerObject* vobj = (LLViewerObject*) getParent();
+
+ while (vobj && !vobj->asAvatar())
+ {
+ vobj = (LLViewerObject*) vobj->getParent();
+ }
+
+ return (LLVOAvatar*) vobj;
+ }
+
+ return NULL;
+}
+
+
class ObjectPhysicsProperties : public LLHTTPNode
{
public: