diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-06-29 18:00:26 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-06-29 18:00:26 -0500 |
| commit | 56ae3e0a083aefcbd6d7c955bb2c7e9e58000a4b (patch) | |
| tree | 53ad2998536760442a00b1d239a7223e864ba3c9 /indra/newview/llpanelobject.cpp | |
| parent | fd6b5ea8c3df7e8b4b648ac7ecc9f30eedd4b7c0 (diff) | |
| parent | 36fd0f7ca932cce5cd3614c16cd26aceedf57952 (diff) | |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
| -rw-r--r-- | indra/newview/llpanelobject.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 831c89b005..64f1fc9b90 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1672,8 +1672,19 @@ void LLPanelObject::sendPosition(BOOL btn_down) // Make sure new position is in a valid region, so the object // won't get dumped by the simulator. LLVector3d new_pos_global = regionp->getPosGlobalFromRegion(newpos); - - if ( LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global) ) + bool is_valid_pos = true; + if (mObject->isAttachment()) + { + LLVector3 delta_pos = mObject->getPositionEdit() - newpos; + LLVector3d attachment_pos = regionp->getPosGlobalFromRegion(mObject->getPositionRegion() + delta_pos); + is_valid_pos = LLWorld::getInstance()->positionRegionValidGlobal(attachment_pos); + } + else + { + is_valid_pos = LLWorld::getInstance()->positionRegionValidGlobal(new_pos_global); + } + + if (is_valid_pos) { // send only if the position is changed, that is, the delta vector is not zero LLVector3d old_pos_global = mObject->getPositionGlobal(); |
