diff options
author | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
---|---|---|
committer | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
commit | 52562e2e664c70dcd476291820ac02b893e489b8 (patch) | |
tree | 5137f49f194a6a28f290385c38f689d77656b2e0 /indra/newview/lltoolplacer.cpp | |
parent | bc39ad916e8f23ffae12184eee675aa7c1be2ca9 (diff) |
svn merge -r92720:92721 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-merge
QAR-698 / DEV-9985 add touch "position" information to touch-events in LSL
Diffstat (limited to 'indra/newview/lltoolplacer.cpp')
-rw-r--r-- | indra/newview/lltoolplacer.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 7d4d0397cc..8806d1465a 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -81,14 +81,22 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, // Viewer-side pick to find the right sim to create the object on. // First find the surface the object will be created on. - gViewerWindow->hitObjectOrLandGlobalImmediate(x, y, NULL, FALSE); + LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE); // Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok // representations (if any) are NOT the same as their viewer representation. - *hit_obj = gObjectList.findObject( gLastHitNonFloraObjectID ); - *hit_face = gLastHitNonFloraObjectFace; - *b_hit_land = !(*hit_obj) && !gLastHitNonFloraPosGlobal.isExactlyZero(); - LLVector3d land_pos_global = gLastHitNonFloraPosGlobal; + if (pick.mPickType == LLPickInfo::PICK_FLORA) + { + *hit_obj = NULL; + *hit_face = -1; + } + else + { + *hit_obj = pick.getObject(); + *hit_face = pick.mObjectFace; + } + *b_hit_land = !(*hit_obj) && !pick.mPosGlobal.isExactlyZero(); + LLVector3d land_pos_global = pick.mPosGlobal; // Make sure there's a surface to place the new object on. BOOL bypass_sim_raycast = FALSE; |