summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-09 16:48:04 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-09 16:48:04 +0000
commit07e925d279b6c52c0cf352173dfb81fd1740d651 (patch)
tree393197eab99fa8d45a997ec2999c7b0bf595b476
parent625344a8e318b24b7d96a9bb9fa2da23166b991f (diff)
MAINT-7913, MAINT-7817 - fix for animesh attachment corruption after teleporting to a different simulator. Turns out the control avatar (skeleton) was getting caught up in the cleanup for the original region
-rw-r--r--indra/newview/llcontrolavatar.cpp14
-rw-r--r--indra/newview/llviewerobject.cpp5
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 51dc7d7de1..699c3ce1f9 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -32,6 +32,7 @@
#include "llanimationstates.h"
#include "llviewercontrol.h"
#include "llmeshrepository.h"
+#include "llviewerregion.h"
LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) :
LLVOAvatar(id, pcode, regionp),
@@ -275,6 +276,19 @@ void LLControlAvatar::updateDebugText()
total_linkset_count, animated_volume_count, active_string.c_str()));
addDebugText(llformat("types %s lods %s", type_string.c_str(), lod_string.c_str()));
addDebugText(llformat("tris %d verts %d", total_tris, total_verts));
+ std::string region_name = "no region";
+ if (mRootVolp->getRegion())
+ {
+ region_name = mRootVolp->getRegion()->getName();
+ }
+ std::string skel_region_name = "skel no region";
+ if (getRegion())
+ {
+ skel_region_name = getRegion()->getName();
+ }
+ addDebugText(llformat("region %x %s skel %x %s",
+ mRootVolp->getRegion(), region_name.c_str(),
+ getRegion(), skel_region_name.c_str()));
//addDebugText(llformat("anim time %.1f (step %f factor %f)",
// mMotionController.getAnimTime(),
// mMotionController.getTimeStep(),
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 42f6b081e5..e49c37be5e 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -6102,6 +6102,11 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp)
child->setRegion(regionp);
}
+ if (mControlAvatar)
+ {
+ mControlAvatar->setRegion(regionp);
+ }
+
setChanged(MOVED | SILHOUETTE);
updateDrawable(FALSE);
}