diff options
author | Kakurady | 2009-10-19 20:24:58 -0400 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:40:54 -0500 |
commit | 57d360bab08f641b3567c488dee31e81a7012238 (patch) | |
tree | 348030a042b6822dd35f982c9b6f453f41b824b8 /linden/indra | |
parent | Fixed 'Currently Online' text in profile being misaligned and 'Currently Offl... (diff) | |
download | meta-impy-57d360bab08f641b3567c488dee31e81a7012238.zip meta-impy-57d360bab08f641b3567c488dee31e81a7012238.tar.gz meta-impy-57d360bab08f641b3567c488dee31e81a7012238.tar.bz2 meta-impy-57d360bab08f641b3567c488dee31e81a7012238.tar.xz |
Removing camera-behind-agent-head-blocking-view-when-looking-at-last-chatter feature.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 532b777..1a65cb1 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -4698,7 +4698,7 @@ void LLAgent::heardChat(const LLUUID& id) | |||
4698 | void LLAgent::lookAtLastChat() | 4698 | void LLAgent::lookAtLastChat() |
4699 | { | 4699 | { |
4700 | // Block if camera is animating or not in normal third person camera mode | 4700 | // Block if camera is animating or not in normal third person camera mode |
4701 | if (mCameraAnimating || !cameraThirdPerson()) | 4701 | if (!cameraThirdPerson()) |
4702 | { | 4702 | { |
4703 | return; | 4703 | return; |
4704 | } | 4704 | } |
@@ -4710,60 +4710,29 @@ void LLAgent::lookAtLastChat() | |||
4710 | if (chatter->isAvatar()) | 4710 | if (chatter->isAvatar()) |
4711 | { | 4711 | { |
4712 | LLVOAvatar *chatter_av = (LLVOAvatar*)chatter; | 4712 | LLVOAvatar *chatter_av = (LLVOAvatar*)chatter; |
4713 | if (mAvatarObject.notNull() && chatter_av->mHeadp) | ||
4714 | { | ||
4715 | delta_pos = chatter_av->mHeadp->getWorldPosition() - mAvatarObject->mHeadp->getWorldPosition(); | ||
4716 | } | ||
4717 | else | ||
4718 | { | ||
4719 | delta_pos = chatter->getPositionAgent() - getPositionAgent(); | ||
4720 | } | ||
4721 | delta_pos.normalize(); | ||
4722 | 4713 | ||
4723 | setControlFlags(AGENT_CONTROL_STOP); | 4714 | setControlFlags(AGENT_CONTROL_STOP); |
4724 | 4715 | ||
4725 | changeCameraToThirdPerson(); | 4716 | changeCameraToThirdPerson(); |
4726 | 4717 | ||
4727 | LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); | ||
4728 | LLVector3 left = delta_pos % LLVector3::z_axis; | ||
4729 | left.normalize(); | ||
4730 | LLVector3 up = left % delta_pos; | ||
4731 | up.normalize(); | ||
4732 | new_camera_pos -= delta_pos * 0.4f; | ||
4733 | new_camera_pos += left * 0.3f; | ||
4734 | new_camera_pos += up * 0.2f; | ||
4735 | if (chatter_av->mHeadp) | 4718 | if (chatter_av->mHeadp) |
4736 | { | 4719 | { |
4737 | setFocusGlobal(getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), mLastChatterID); | 4720 | setFocusGlobal(getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), mLastChatterID); |
4738 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()); | ||
4739 | } | 4721 | } |
4740 | else | 4722 | else |
4741 | { | 4723 | { |
4742 | setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); | 4724 | setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); |
4743 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); | ||
4744 | } | 4725 | } |
4745 | setFocusOnAvatar(FALSE, TRUE); | 4726 | setFocusOnAvatar(FALSE, TRUE); |
4746 | } | 4727 | } |
4747 | else | 4728 | else |
4748 | { | 4729 | { |
4749 | delta_pos = chatter->getRenderPosition() - getPositionAgent(); | ||
4750 | delta_pos.normalize(); | ||
4751 | 4730 | ||
4752 | setControlFlags(AGENT_CONTROL_STOP); | 4731 | setControlFlags(AGENT_CONTROL_STOP); |
4753 | 4732 | ||
4754 | changeCameraToThirdPerson(); | 4733 | changeCameraToThirdPerson(); |
4755 | 4734 | ||
4756 | LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); | ||
4757 | LLVector3 left = delta_pos % LLVector3::z_axis; | ||
4758 | left.normalize(); | ||
4759 | LLVector3 up = left % delta_pos; | ||
4760 | up.normalize(); | ||
4761 | new_camera_pos -= delta_pos * 0.4f; | ||
4762 | new_camera_pos += left * 0.3f; | ||
4763 | new_camera_pos += up * 0.2f; | ||
4764 | |||
4765 | setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); | 4735 | setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); |
4766 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); | ||
4767 | setFocusOnAvatar(FALSE, TRUE); | 4736 | setFocusOnAvatar(FALSE, TRUE); |
4768 | } | 4737 | } |
4769 | } | 4738 | } |