diff options
| author | Josh Bell <josh@lindenlab.com> | 2008-03-14 19:27:38 +0000 |
|---|---|---|
| committer | Josh Bell <josh@lindenlab.com> | 2008-03-14 19:27:38 +0000 |
| commit | 133a7b5fe2bcaaec8389b209cb5bd774ebc2ab63 (patch) | |
| tree | d7a8f7846af7dc948d9e11c5a75dd830fb12465c /indra/newview/lltooldraganddrop.cpp | |
| parent | a1cde743e755d826c86aeb006d2027ad2e5c8ce3 (diff) | |
svn merge -r 82272:82277 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-ui-9-merge-2 --> release
QAR-364 - merge of maint-ui-9
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
| -rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index f4de261240..b4107192d6 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1465,6 +1465,16 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // Select the object only if we're editing. BOOL rez_selected = gToolMgr->inEdit(); + + LLVector3 ray_start = regionp->getPosRegionFromGlobal(mLastCameraPos); + LLVector3 ray_end = regionp->getPosRegionFromGlobal(mLastHitPos); + // currently the ray's end point is an approximation, + // and is sometimes too short (causing failure.) so we + // double the ray's length: + LLVector3 ray_direction = ray_start - ray_end; + ray_end = ray_end - ray_direction; + + // Message packing code should be it's own uninterrupted block LLMessageSystem* msg = gMessageSystem; if (mSource == SOURCE_NOTECARD) @@ -1488,8 +1498,8 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // optimization. msg->addUUIDFast(_PREHASH_FromTaskID, source_id); msg->addU8Fast(_PREHASH_BypassRaycast, (U8) bypass_sim_raycast); - msg->addVector3Fast(_PREHASH_RayStart, regionp->getPosRegionFromGlobal(mLastCameraPos)); - msg->addVector3Fast(_PREHASH_RayEnd, regionp->getPosRegionFromGlobal(mLastHitPos)); + msg->addVector3Fast(_PREHASH_RayStart, ray_start); + msg->addVector3Fast(_PREHASH_RayEnd, ray_end); msg->addUUIDFast(_PREHASH_RayTargetID, ray_target_id ); msg->addBOOLFast(_PREHASH_RayEndIsIntersection, FALSE); msg->addBOOLFast(_PREHASH_RezSelected, rez_selected); |
