summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentcamera.cpp7
-rw-r--r--indra/newview/llagentcamera.h1
-rw-r--r--indra/newview/llpaneleditwearable.cpp1
-rw-r--r--indra/newview/lltoolfocus.cpp1
-rw-r--r--indra/newview/llvoavatar.cpp3
5 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 70f9fa03e4..e1a0162441 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -95,6 +95,8 @@ const F32 OBJECT_MIN_ZOOM = 0.02f;
const F32 APPEARANCE_MIN_ZOOM = 0.39f;
const F32 APPEARANCE_MAX_ZOOM = 8.f;
+const F32 CUSTOMIZE_AVATAR_CAMERA_DEFAULT_DIST = 3.5f;
+
const F32 GROUND_TO_AIR_CAMERA_TRANSITION_TIME = 0.5f;
const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f;
@@ -2325,8 +2327,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
{
if(avatar_animate)
{
- // slamming the avatar's axis to the camera so that when the rotation
- // completes it correctly points to the front of the avatar
// Remove any pitch or rotation from the avatar
LLVector3 at = gAgent.getAtAxis();
at.mV[VZ] = 0.f;
@@ -2356,7 +2356,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came
LLVector3d camera_offset(agent_at * -1.0);
// push camera up and out from avatar
camera_offset.mdV[VZ] = 0.1f;
- camera_offset *= 3.5f;
+ camera_offset *= CUSTOMIZE_AVATAR_CAMERA_DEFAULT_DIST;
LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target);
setCameraPosAndFocusGlobal(focus_target_global + camera_offset, focus_target_global, gAgent.getID());
@@ -2392,6 +2392,7 @@ void LLAgentCamera::setAnimationDuration(F32 duration)
{
if (mCameraAnimating)
{
+ // do not cut any existing camera animation short
F32 animation_left = llmax(0.f, mAnimationDuration - mAnimationTimer.getElapsedTimeF32());
mAnimationDuration = llmax(duration, animation_left);
}
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index aba8b0b67f..3b8f88733a 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -137,7 +137,6 @@ public:
F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters
void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; }
BOOL calcCameraMinDistance(F32 &obj_min_distance);
- F32 calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_global);
F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); }
void clearCameraLag() { mCameraLag.clearVec(); }
private:
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 71edd39348..ae54909945 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1127,7 +1127,6 @@ void LLPanelEditWearable::changeCamera(U8 subpart)
}
// Update the camera
- gMorphView->setCameraDistToDefault();
gMorphView->setCameraTargetJoint( gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ) );
gMorphView->setCameraTargetOffset( subpart_entry->mTargetOffset );
gMorphView->setCameraOffset( subpart_entry->mCameraOffset );
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 032714cabf..b9875f465a 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -236,7 +236,6 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
LLVector3d cam_pos = gAgentCamera.getCameraPositionGlobal();
- cam_pos -= LLVector3d(LLViewerCamera::getInstance()->getLeftAxis() * gAgentCamera.calcCustomizeAvatarUIOffset( cam_pos ));
gAgentCamera.setCameraPosAndFocusGlobal( cam_pos, pick_info.mPosGlobal, pick_info.mObjectID);
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f2f91dcc4a..3dce4ce0bc 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3201,6 +3201,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
visible = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE;
}
+ // don't early out for your own avatar, as we rely on your animations playing reliably
+ // for example, the "turn around" animation when entering customize avatar needs to trigger
+ // even when your avatar is offscreen
if (!visible && !isSelf())
{
updateMotions(LLCharacter::HIDDEN_UPDATE);