SL-10536 Crash in getPosRegionFromAgent

meow-7.2.2
andreykproductengine 2019-08-29 18:32:42 +03:00
parent 6897ad72ff
commit 1bc652075b
1 changed files with 8 additions and 2 deletions

View File

@ -171,7 +171,10 @@ void LLControlAvatar::matchVolumeTransform()
if (attached_av)
{
LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp);
setPositionAgent(mRootVolp->getRenderPosition());
if (getRegion() && !isDead())
{
setPositionAgent(mRootVolp->getRenderPosition());
}
attach->updateWorldPRSParent();
LLVector3 joint_pos = attach->getWorldPosition();
LLQuaternion joint_rot = attach->getWorldRotation();
@ -227,7 +230,10 @@ void LLControlAvatar::matchVolumeTransform()
#endif
setRotation(bind_rot*obj_rot);
mRoot->setWorldRotation(bind_rot*obj_rot);
setPositionAgent(vol_pos);
if (getRegion() && !isDead())
{
setPositionAgent(vol_pos);
}
mRoot->setPosition(vol_pos + mPositionConstraintFixup);
F32 global_scale = gSavedSettings.getF32("AnimatedObjectsGlobalScale");