diff options
author | Richard Linden <none@none> | 2010-06-15 13:53:40 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-06-15 13:53:40 -0700 |
commit | 8b95793c35c2fe1bf8ddf100fb4481b674ddfc63 (patch) | |
tree | ce468fb629b2a7b0de1421448922ed861450f3c6 /indra/newview | |
parent | a37e6ce52eb8c0ed6c433a4d2b23647c590f8312 (diff) |
EXT-6953 WIP fixed walk cycle foot slip feedback to not speed up animation so much
also, made camera default target and offset live-settable for debugging
reviewed by vir
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagentcamera.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llagentcamera.h | 5 |
2 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 977f1c9fa8..3fc5e88633 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -207,13 +207,13 @@ void LLAgentCamera::init() mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); - mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3("CameraOffsetRearView"); - mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3("CameraOffsetFrontView"); - mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3("CameraOffsetGroupView"); + mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView"); + mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView"); + mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("CameraOffsetGroupView"); - mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3d("FocusOffsetRearView"); - mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3d("FocusOffsetFrontView"); - mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3d("FocusOffsetGroupView"); + mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView"); + mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView"); + mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView"); mCameraCollidePlane.clearVec(); mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"); @@ -1643,7 +1643,7 @@ LLVector3d LLAgentCamera::calcThirdPersonFocusOffset() agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation(); } - focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot; + focus_offset = convert_from_llsd<LLVector3d>(mFocusOffsetInitial[mCameraPreset]->get(), TYPE_VEC3D, ""); return focus_offset; } @@ -1978,7 +1978,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) LLVector3 LLAgentCamera::getCameraOffsetInitial() { - return mCameraOffsetInitial[mCameraPreset]; + return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, ""); } diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 5cbb1de6f4..7afb5c0ed9 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -39,6 +39,7 @@ class LLPickInfo; class LLVOAvatarSelf; +class LLControlVariable; //-------------------------------------------------------------------- // Types @@ -121,10 +122,10 @@ private: ECameraPreset mCameraPreset; /** Initial camera offsets */ - std::map<ECameraPreset, LLVector3> mCameraOffsetInitial; + std::map<ECameraPreset, LLPointer<LLControlVariable> > mCameraOffsetInitial; /** Initial focus offsets */ - std::map<ECameraPreset, LLVector3d> mFocusOffsetInitial; + std::map<ECameraPreset, LLPointer<LLControlVariable> > mFocusOffsetInitial; //-------------------------------------------------------------------- // Position |