summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-03-29 17:53:21 +0100
committerAimee Linden <aimee@lindenlab.com>2010-03-29 17:53:21 +0100
commiteb0aaff4aac1dcf9f238242c107df650584efdf9 (patch)
treeb07b612c33f23e820492b06488a8c406856b64c8 /indra/newview/lltoolpie.cpp
parentfc0906d6e8c1238fe7fd21c185957ca89511e76e (diff)
parentb6e7850c0a3d65ed0a1501e19a1655055000e32f (diff)
Merge
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b7947cf4ae..84c463495b 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -205,15 +205,15 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
-
- if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting
{
- handle_object_sit_or_stand();
- // put focus in world when sitting on an object
- gFocusMgr.setKeyboardFocus(NULL);
- return TRUE;
- } // else nothing (fall through to touch)
-
+ if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting
+ {
+ handle_object_sit_or_stand();
+ // put focus in world when sitting on an object
+ gFocusMgr.setKeyboardFocus(NULL);
+ return TRUE;
+ } // else nothing (fall through to touch)
+ }
case CLICK_ACTION_PAY:
if ((object && object->flagTakesMoney())
|| (parent && parent->flagTakesMoney()))
@@ -330,7 +330,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
}
object = (LLViewerObject*)object->getParent();
}
- if (object && object == gAgent.getAvatarObject())
+ if (object && object == gAgentAvatarp)
{
// we left clicked on avatar, switch to focus mode
LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
@@ -411,9 +411,11 @@ ECursorType cursor_from_object(LLViewerObject* object)
switch(click_action)
{
case CLICK_ACTION_SIT:
- if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting?
{
- cursor = UI_CURSOR_TOOLSIT;
+ if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting?
+ {
+ cursor = UI_CURSOR_TOOLSIT;
+ }
}
break;
case CLICK_ACTION_BUY: