summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rw-r--r--indra/newview/llmaniprotate.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 6dc0a929c8..6747bcb9c9 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -65,6 +65,7 @@
#include "lldrawable.h"
#include "llglheaders.h"
#include "lltrans.h"
+#include "llvoavatarself.h"
const F32 RADIUS_PIXELS = 100.f; // size in screen space
const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS;
@@ -739,7 +740,7 @@ void LLManipRotate::renderSnapGuides()
LLVector3 test_axis = constraint_axis;
BOOL constrain_to_ref_object = FALSE;
- if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
test_axis = test_axis * ~grid_rotation;
}
@@ -766,7 +767,7 @@ void LLManipRotate::renderSnapGuides()
}
LLVector3 projected_snap_axis = world_snap_axis;
- if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
projected_snap_axis = projected_snap_axis * grid_rotation;
}
@@ -1282,7 +1283,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
LLVector3 axis2;
LLVector3 test_axis = constraint_axis;
- if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
test_axis = test_axis * ~grid_rotation;
}
@@ -1306,7 +1307,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
axis1 = LLVector3::x_axis;
}
- if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject())
+ if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid())
{
axis1 = axis1 * grid_rotation;
}