summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-xindra/llcharacter/lljoint.cpp17
-rwxr-xr-xindra/llcharacter/lljoint.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index cab3a7d619..6615a430ab 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -89,6 +89,11 @@ bool LLPosOverrideMap::remove(const LLUUID& mesh_id)
return (remove_count > 0);
}
+void LLPosOverrideMap::clear()
+{
+ m_map.clear();
+}
+
//-----------------------------------------------------------------------------
// LLJoint()
// Class Constructor
@@ -368,6 +373,18 @@ bool LLJoint::hasAttachmentPosOverride( LLVector3& pos, LLUUID& mesh_id ) const
}
//--------------------------------------------------------------------
+// clearAttachmentPosOverrides()
+//--------------------------------------------------------------------
+void LLJoint::clearAttachmentPosOverrides()
+{
+ if (m_attachmentOverrides.count())
+ {
+ m_attachmentOverrides.clear();
+ setPosition(m_posBeforeOverrides);
+ }
+}
+
+//--------------------------------------------------------------------
// updatePos()
//--------------------------------------------------------------------
void LLJoint::updatePos(const std::string& av_info)
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 56da8e83b2..2abe1d6db1 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -55,6 +55,7 @@ public:
U32 count() const;
void add(const LLUUID& mesh_id, const LLVector3& pos);
bool remove(const LLUUID& mesh_id);
+ void clear();
private:
typedef std::map<LLUUID,LLVector3> map_type;
map_type m_map;
@@ -202,6 +203,7 @@ public:
void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info );
void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info );
bool hasAttachmentPosOverride( LLVector3& pos, LLUUID& mesh_id ) const;
+ void clearAttachmentPosOverrides();
//Accessor for the joint id
LLUUID getId( void ) { return mId; }