diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 21:00:07 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 21:23:23 +0300 |
commit | 069304ca394d4d6069f00bb976f2d75e82bf675c (patch) | |
tree | f882ecf526effeda207d418049391a315b17cc2f /indra/newview/llpanelobject.cpp | |
parent | f6515257a0cc405d6549c5d56302fb0d90176807 (diff) | |
parent | 1e4f2ec07e32a142f35817d3186a124df3f8cd25 (diff) |
Merge branch 'master' (DRTVWR-543) into DRTVWR-559
# Conflicts:
# autobuild.xml
# indra/llrender/llgl.cpp
# indra/newview/CMakeLists.txt
# indra/newview/llvovolume.cpp
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(); |