diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-01-15 16:45:24 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-01-15 16:45:24 -0500 |
commit | d2de97ad8e84eedd42f4a0fe5b258617a96f154b (patch) | |
tree | 21a60e9d713c5f0cc49bb157772af233ebe8faa9 /indra/llcharacter | |
parent | be83e48fc12fbaf225f9f3e6ad5042320595ce26 (diff) |
SL-92 WIP - more on hover management
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-x | indra/llcharacter/llcharacter.h | 6 | ||||
-rwxr-xr-x | indra/llcharacter/llkeyframemotion.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 085b681854..1a3e307663 100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -261,7 +261,8 @@ public: static std::vector< LLCharacter* > sInstances; static BOOL sAllowInstancesChange ; //debug use - LLVector3 mHoverOffset; + virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; } + const LLVector3& getHoverOffset() const { return mHoverOffset; } protected: LLMotionController mMotionController; @@ -275,7 +276,6 @@ protected: U32 mSkeletonSerialNum; LLAnimPauseRequest mPauseRequest; - private: // visual parameter stuff typedef std::map<S32, LLVisualParam *> visual_param_index_map_t; @@ -286,6 +286,8 @@ private: visual_param_name_map_t mVisualParamNameMap; static LLStringTable sVisualParamNames; + + LLVector3 mHoverOffset; }; #endif // LL_LLCHARACTER_H diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 89bec40323..5317e230c8 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -984,7 +984,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 { case CONSTRAINT_TARGET_TYPE_GROUND: target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos); - target_pos += mCharacter->mHoverOffset; + target_pos += mCharacter->getHoverOffset(); // LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; case CONSTRAINT_TARGET_TYPE_BODY: |