summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r--indra/newview/llmoveview.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 70053a7b48..7df5a33313 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -41,7 +41,8 @@
// Viewer includes
#include "llagent.h"
-#include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting()
+#include "llagentcamera.h"
+#include "llvoavatarself.h" // to check gAgentAvatarp->isSitting()
#include "llbottomtray.h"
#include "llbutton.h"
#include "llfloaterreg.h"
@@ -200,7 +201,7 @@ void LLFloaterMove::setFlyingMode(BOOL fly)
{
instance->setFlyingModeImpl(fly);
LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject();
- BOOL is_sitting = avatar_object
+ bool is_sitting = avatar_object
&& (avatar_object->getRegion() != NULL)
&& (!avatar_object->isDead())
&& avatar_object->isSitting();
@@ -336,7 +337,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode)
updateButtonsWithMovementMode(mode);
bool bHideModeButtons = MM_FLY == mode
- || (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting());
+ || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
showModeButtons(!bHideModeButtons);
@@ -392,9 +393,9 @@ void LLFloaterMove::initMovementMode()
}
setMovementMode(initMovementMode);
- if (gAgent.getAvatarObject())
+ if (isAgentAvatarValid())
{
- setEnabled(!gAgent.getAvatarObject()->isSitting());
+ setEnabled(!gAgentAvatarp->isSitting());
}
}
@@ -495,7 +496,7 @@ void LLFloaterMove::onOpen(const LLSD& key)
showModeButtons(FALSE);
}
- if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting())
+ if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
{
setSittingMode(TRUE);
showModeButtons(FALSE);
@@ -598,7 +599,7 @@ BOOL LLPanelStandStopFlying::postBuild()
void LLPanelStandStopFlying::setVisible(BOOL visible)
{
//we dont need to show the panel if these buttons are not activated
- if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
+ if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
if (visible)
{