Moved mHoverOffset to LLCharacter so it's accessible inside animations. Apply offset when constrained to ground.

master
Brad Payne (Vir Linden) 2015-01-05 18:13:33 -05:00
parent 62ab044b1a
commit 07812106ed
4 changed files with 6 additions and 5 deletions

View File

@ -261,6 +261,8 @@ public:
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
LLVector3 mHoverOffset;
protected:
LLMotionController mMotionController;

View File

@ -984,6 +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;
// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
break;
case CONSTRAINT_TARGET_TYPE_BODY:

View File

@ -721,11 +721,11 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
mLastUpdateReceivedCOFVersion(-1),
mHoverOffset(0.0, 0.0, 0.0)
mLastUpdateReceivedCOFVersion(-1)
//mHoverOffset(0.0, 0.0, 0.0)
{
//VTResume(); // VTune
mHoverOffset = LLVector3(0.0, 0.0, 0.0);
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim );

View File

@ -213,8 +213,6 @@ public:
/*virtual*/ LLVector3 getPosAgentFromGlobal(const LLVector3d &position);
virtual void updateVisualParams();
LLVector3 mHoverOffset;
/** Inherited
** **
*******************************************************************************/