aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltoolobjpicker.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/lltoolobjpicker.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lltoolobjpicker.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/linden/indra/newview/lltoolobjpicker.cpp b/linden/indra/newview/lltoolobjpicker.cpp
index f5d25d8..401c6c6 100644
--- a/linden/indra/newview/lltoolobjpicker.cpp
+++ b/linden/indra/newview/lltoolobjpicker.cpp
@@ -50,7 +50,7 @@
50 50
51 51
52LLToolObjPicker::LLToolObjPicker() 52LLToolObjPicker::LLToolObjPicker()
53: LLTool( "ObjPicker", NULL ), 53: LLTool( std::string("ObjPicker"), NULL ),
54 mPicked( FALSE ), 54 mPicked( FALSE ),
55 mHitObjectID( LLUUID::null ), 55 mHitObjectID( LLUUID::null ),
56 mExitCallback( NULL ), 56 mExitCallback( NULL ),
@@ -69,7 +69,7 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
69 if (! handled) 69 if (! handled)
70 { 70 {
71 // didn't click in any UI object, so must have clicked in the world 71 // didn't click in any UI object, so must have clicked in the world
72 gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback); 72 gViewerWindow->pickAsync(x, y, mask, pickCallback);
73 handled = TRUE; 73 handled = TRUE;
74 } 74 }
75 else 75 else
@@ -90,16 +90,10 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
90 return handled; 90 return handled;
91} 91}
92 92
93void LLToolObjPicker::pickCallback(S32 x, S32 y, MASK mask) 93void LLToolObjPicker::pickCallback(const LLPickInfo& pick_info)
94{ 94{
95 // You must hit the body for this tool to think you hit the object. 95 LLToolObjPicker::getInstance()->mHitObjectID = pick_info.mObjectID;
96 LLViewerObject* objectp = NULL; 96 LLToolObjPicker::getInstance()->mPicked = pick_info.mObjectID.notNull();
97 objectp = gObjectList.findObject( gLastHitObjectID );
98 if (objectp)
99 {
100 LLToolObjPicker::getInstance()->mHitObjectID = objectp->mID;
101 LLToolObjPicker::getInstance()->mPicked = TRUE;
102 }
103} 97}
104 98
105 99
@@ -181,3 +175,4 @@ void LLToolObjPicker::handleDeselect()
181} 175}
182 176
183 177
178