summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolobjpicker.cpp
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
commitdf4f20d4f51e41355e876f734527b4245543415c (patch)
tree36aaf66ddb96b27fb9701764153cd7d17add275a /indra/newview/lltoolobjpicker.cpp
parent0c0391cc7114bd2e9e4462c40e88814326f61bc2 (diff)
merge uv-picking branch.
svn merge -r92602:92632 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-4
Diffstat (limited to 'indra/newview/lltoolobjpicker.cpp')
-rw-r--r--indra/newview/lltoolobjpicker.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp
index 67e0db962f..ee9c24f269 100644
--- a/indra/newview/lltoolobjpicker.cpp
+++ b/indra/newview/lltoolobjpicker.cpp
@@ -69,7 +69,7 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
if (! handled)
{
// didn't click in any UI object, so must have clicked in the world
- gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback);
handled = TRUE;
}
else
@@ -90,16 +90,10 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-void LLToolObjPicker::pickCallback(S32 x, S32 y, MASK mask)
+void LLToolObjPicker::pickCallback(const LLPickInfo& pick_info)
{
- // You must hit the body for this tool to think you hit the object.
- LLViewerObject* objectp = NULL;
- objectp = gObjectList.findObject( gLastHitObjectID );
- if (objectp)
- {
- LLToolObjPicker::getInstance()->mHitObjectID = objectp->mID;
- LLToolObjPicker::getInstance()->mPicked = TRUE;
- }
+ LLToolObjPicker::getInstance()->mHitObjectID = pick_info.mObjectID;
+ LLToolObjPicker::getInstance()->mPicked = pick_info.mObjectID.notNull();
}
@@ -181,3 +175,4 @@ void LLToolObjPicker::handleDeselect()
}
+