diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2021-09-23 16:28:14 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2021-09-23 16:28:14 -0400 |
| commit | 274fc85fcbbe37f491f2d78b8b0f0b4ebb7bba26 (patch) | |
| tree | e27d31612409d665120defe7f7d120ea5a876324 /indra/newview/llpanelobject.cpp | |
| parent | 2b96d1bbe00c317ea8dfe420dd4167dde5d153ae (diff) | |
| parent | 1d6bfb727a8015e82cd4060a0c73cf3fc719e818 (diff) | |
DRTVWR-543: Merge branch 'DRTVWR-543-maint' into classic
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
| -rw-r--r-- | indra/newview/llpanelobject.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 6bff95ab36..5248ba31f5 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); + 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 ( 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(); |
