V3 mesh, texture, and hover merge.
This commit is contained in:
@@ -372,10 +372,17 @@ void LLViewerObject::markDead()
|
||||
//</singu>
|
||||
|
||||
// Root object of this hierarchy unlinks itself.
|
||||
LLVOAvatar *av = getAvatarAncestor();
|
||||
if (getParent())
|
||||
{
|
||||
((LLViewerObject *)getParent())->removeChild(this);
|
||||
}
|
||||
LLUUID mesh_id;
|
||||
if (av && LLVOAvatar::getRiggedMeshID(this,mesh_id))
|
||||
{
|
||||
// This case is needed for indirectly attached mesh objects.
|
||||
av->resetJointPositionsOnDetach(mesh_id);
|
||||
}
|
||||
|
||||
// Mark itself as dead
|
||||
mDead = TRUE;
|
||||
@@ -4798,6 +4805,22 @@ LLVOAvatar* LLViewerObject::asAvatar()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// If this object is directly or indirectly parented by an avatar, return it.
|
||||
LLVOAvatar* LLViewerObject::getAvatarAncestor()
|
||||
{
|
||||
LLViewerObject *pobj = (LLViewerObject*) getParent();
|
||||
while (pobj)
|
||||
{
|
||||
LLVOAvatar *av = pobj->asAvatar();
|
||||
if (av)
|
||||
{
|
||||
return av;
|
||||
}
|
||||
pobj = (LLViewerObject*) pobj->getParent();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BOOL LLViewerObject::isParticleSource() const
|
||||
{
|
||||
return !mPartSourcep.isNull() && !mPartSourcep->isDead();
|
||||
|
||||
Reference in New Issue
Block a user