summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-19 13:36:54 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-19 13:36:54 +0100
commit2336188eeda9d074282886c610c918328e563fb7 (patch)
tree9322c15ac2b7736c7a24660ac355d7bcc89167c7 /indra/newview
parent7d349bfde33e7882b0ddf79def10974330309c7f (diff)
parentea6a3e8e7801425faa75fdd8a40b7990a58ee0d4 (diff)
merge from PE's viewer-hotfix
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp12
-rw-r--r--indra/newview/llmoveview.cpp8
-rw-r--r--indra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/llvoavatar.cpp2
4 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index c5d7f6f118..5c54146caa 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2296,6 +2296,13 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
{
resetAxes(mAutoPilotTargetFacing);
}
+ // Restore previous flying state before invoking mAutoPilotFinishedCallback to allow
+ // callback function to change the flying state (like in near_sit_down_point()).
+ // If the user cancelled, don't change the fly state
+ if (!user_cancel)
+ {
+ setFlying(mAutoPilotFlyOnStop);
+ }
//NB: auto pilot can terminate for a reason other than reaching the destination
if (mAutoPilotFinishedCallback)
{
@@ -2303,11 +2310,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
}
mLeaderID = LLUUID::null;
- // If the user cancelled, don't change the fly state
- if (!user_cancel)
- {
- setFlying(mAutoPilotFlyOnStop);
- }
setControlFlags(AGENT_CONTROL_STOP);
if (user_cancel && !mAutoPilotBehaviorName.empty())
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 1853b511be..70053a7b48 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -199,7 +199,12 @@ void LLFloaterMove::setFlyingMode(BOOL fly)
if (instance)
{
instance->setFlyingModeImpl(fly);
- instance->showModeButtons(!fly);
+ LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject();
+ BOOL is_sitting = avatar_object
+ && (avatar_object->getRegion() != NULL)
+ && (!avatar_object->isDead())
+ && avatar_object->isSitting();
+ instance->showModeButtons(!fly && !is_sitting);
}
if (fly)
{
@@ -695,6 +700,7 @@ void LLPanelStandStopFlying::onStandButtonClick()
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
setFocus(FALSE); // EXT-482
+ mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once.
}
void LLPanelStandStopFlying::onStopFlyingButtonClick()
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3d0dfbed40..fab1d983c2 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4169,6 +4169,9 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
}
gAgent.setForceMouselook(force_mouselook);
+ // Forcing turning off flying here to prevent flying after pressing "Stand"
+ // to stand up from an object. See EXT-1655.
+ gAgent.setFlying(FALSE);
LLViewerObject* object = gObjectList.findObject(sitObjectID);
if (object)
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 981dd14093..86987f4c78 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5653,6 +5653,8 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
gPipeline.markMoved(mDrawable, TRUE);
+ // Notice that removing sitDown() from here causes avatars sitting on
+ // objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655.
sitDown(TRUE);
mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
mRoot.setPosition(getPosition());