summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 714145ce14..2b5c3361c4 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -57,6 +57,7 @@
#include "llkeyframestandmotion.h"
#include "llkeyframewalkmotion.h"
#include "llmutelist.h"
+#include "llmoveview.h"
#include "llnotify.h"
#include "llquantize.h"
#include "llregionhandle.h"
@@ -2214,7 +2215,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
else { llinfos << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << llendl; }
// this is the call that Karl S. created for triggering gestures from within the code.
- gGestureManager.triggerAndReviseString( gestureString );
+ LLGestureManager::instance().triggerAndReviseString( gestureString );
}
}
@@ -4244,7 +4245,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
}
else if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED)
{
- mIsSitting = TRUE;
+ sitDown(TRUE);
}
@@ -4261,7 +4262,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
{
if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED)
{
- mIsSitting = FALSE;
+ sitDown(FALSE);
}
stopMotion(anim_id);
result = TRUE;
@@ -5484,6 +5485,19 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
}
//-----------------------------------------------------------------------------
+// sitDown()
+//-----------------------------------------------------------------------------
+void LLVOAvatar::sitDown(BOOL bSitting)
+{
+ mIsSitting = bSitting;
+ if (isSelf())
+ {
+ // Update Movement Controls according to own Sitting mode
+ LLFloaterMove::setSittingMode(bSitting);
+ }
+}
+
+//-----------------------------------------------------------------------------
// sitOnObject()
//-----------------------------------------------------------------------------
void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
@@ -5502,7 +5516,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
gPipeline.markMoved(mDrawable, TRUE);
- mIsSitting = TRUE;
+ sitDown(TRUE);
mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
mRoot.setPosition(getPosition());
mRoot.updateWorldMatrixChildren();
@@ -5566,7 +5580,8 @@ void LLVOAvatar::getOffObject()
gPipeline.markMoved(mDrawable, TRUE);
- mIsSitting = FALSE;
+ sitDown(FALSE);
+
mRoot.getXform()->setParent(NULL); // LLVOAvatar::getOffObject
mRoot.setPosition(cur_position_world);
mRoot.setRotation(cur_rotation_world);