summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-12 17:29:50 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-12 17:29:50 +0000
commit80be4c1d2d73982ea2df6dd7ef3fc3465416c882 (patch)
tree9c5958572368be494b6302db8b03967a2c67b7ad /indra/llcharacter
parenta09f7d41efdb945755efaeb07f7418c1f6e2a78b (diff)
QAR-767 Combined maint-render-7 and maint-viewer-9 merge
merge release@93398 viewer-merge-1@94007 -> release dataserver-is-deprecated
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp14
-rw-r--r--indra/llcharacter/llkeyframemotion.h5
2 files changed, 11 insertions, 8 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 710cd44a6f..090e1913cf 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -655,9 +655,9 @@ BOOL LLKeyframeMotion::setupPose()
BOOL LLKeyframeMotion::onActivate()
{
// If the keyframe anim has an associated emote, trigger it.
- if( mEmoteName.length() > 0 )
+ if( mJointMotionList->mEmoteName.length() > 0 )
{
- mCharacter->startMotion( gAnimLibrary.stringToAnimState(mEmoteName) );
+ mCharacter->startMotion( gAnimLibrary.stringToAnimState(mJointMotionList->mEmoteName) );
}
mLastLoopedTime = 0.f;
@@ -1230,7 +1230,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
//-------------------------------------------------------------------------
// get emote (optional)
//-------------------------------------------------------------------------
- if (!dp.unpackString(mEmoteName, "emote_name"))
+ if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name"))
{
llwarns << "can't read optional_emote_animation" << llendl;
return FALSE;
@@ -1672,7 +1672,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
if (!parent)
{
llwarns << "Joint with no parent: " << joint->getName()
- << " Emote: " << mEmoteName << llendl;
+ << " Emote: " << mJointMotionList->mEmoteName << llendl;
return FALSE;
}
joint = parent;
@@ -1710,7 +1710,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
success &= dp.packU16(KEYFRAME_MOTION_SUBVERSION, "sub_version");
success &= dp.packS32(mJointMotionList->mBasePriority, "base_priority");
success &= dp.packF32(mJointMotionList->mDuration, "duration");
- success &= dp.packString(mEmoteName, "emote_name");
+ success &= dp.packString(mJointMotionList->mEmoteName, "emote_name");
success &= dp.packF32(mJointMotionList->mLoopInPoint, "loop_in_point");
success &= dp.packF32(mJointMotionList->mLoopOutPoint, "loop_out_point");
success &= dp.packS32(mJointMotionList->mLoop, "loop");
@@ -1848,11 +1848,11 @@ void LLKeyframeMotion::setEmote(const LLUUID& emote_id)
const char* emote_name = gAnimLibrary.animStateToString(emote_id);
if (emote_name)
{
- mEmoteName = emote_name;
+ mJointMotionList->mEmoteName = emote_name;
}
else
{
- mEmoteName = "";
+ mJointMotionList->mEmoteName = "";
}
}
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index a50447c3bf..d11aec1ed8 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -420,6 +420,10 @@ public:
typedef std::list<JointConstraintSharedData*> constraint_list_t;
constraint_list_t mConstraints;
LLBBoxLocal mPelvisBBox;
+ // mEmoteName is a facial motion, but it's necessary to appear here so that it's cached.
+ // TODO: LLKeyframeDataCache::getKeyframeData should probably return a class containing
+ // JointMotionList and mEmoteName, see LLKeyframeMotion::onInitialize.
+ std::string mEmoteName;
public:
JointMotionList();
~JointMotionList();
@@ -439,7 +443,6 @@ protected:
std::vector<LLPointer<LLJointState> > mJointStates;
LLJoint* mPelvisp;
LLCharacter* mCharacter;
- std::string mEmoteName;
typedef std::list<JointConstraint*> constraint_list_t;
constraint_list_t mConstraints;
U32 mLastSkeletonSerialNum;