Re-determine spatial groups for hud attachments upon teleport. Fixes missing prim issue.
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
#include "llviewermedia.h"
|
#include "llviewermedia.h"
|
||||||
#include "llviewermenu.h"
|
#include "llviewermenu.h"
|
||||||
#include "llviewerobjectlist.h"
|
#include "llviewerobjectlist.h"
|
||||||
|
#include "llviewerparcelmgr.h"
|
||||||
#include "llviewerstats.h"
|
#include "llviewerstats.h"
|
||||||
#include "llviewerregion.h"
|
#include "llviewerregion.h"
|
||||||
#include "llviewertexlayer.h"
|
#include "llviewertexlayer.h"
|
||||||
@@ -180,6 +181,8 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
|
|||||||
|
|
||||||
SHClientTagMgr::instance().updateAvatarTag(this); //No TE update messages for self. Force update here.
|
SHClientTagMgr::instance().updateAvatarTag(this); //No TE update messages for self. Force update here.
|
||||||
|
|
||||||
|
mTeleportFinishedSlot = LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&LLVOAvatarSelf::handleTeleportFinished, this));
|
||||||
|
|
||||||
lldebugs << "Marking avatar as self " << id << llendl;
|
lldebugs << "Marking avatar as self " << id << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3289,3 +3292,23 @@ void LLVOAvatarSelf::setInvisible(bool invisible)
|
|||||||
gAgent.sendAgentSetAppearance();
|
gAgent.sendAgentSetAppearance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLVOAvatarSelf::handleTeleportFinished()
|
||||||
|
{
|
||||||
|
for (attachment_map_t::iterator it = mAttachmentPoints.begin(); it != mAttachmentPoints.end(); ++it)
|
||||||
|
{
|
||||||
|
LLViewerJointAttachment* attachment = it->second;
|
||||||
|
if (attachment && attachment->getIsHUDAttachment())
|
||||||
|
{
|
||||||
|
typedef LLViewerJointAttachment::attachedobjs_vec_t object_vec_t;
|
||||||
|
const object_vec_t& obj_list = attachment->mAttachedObjects;
|
||||||
|
for (object_vec_t::const_iterator it2 = obj_list.begin(); it2 != obj_list.end(); ++it2)
|
||||||
|
{
|
||||||
|
if(*it2)
|
||||||
|
{
|
||||||
|
(*it2)->dirtySpatialGroup(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -429,6 +429,11 @@ private:
|
|||||||
public:
|
public:
|
||||||
static void onChangeSelfInvisible(bool invisible);
|
static void onChangeSelfInvisible(bool invisible);
|
||||||
void setInvisible(bool invisible);
|
void setInvisible(bool invisible);
|
||||||
|
private:
|
||||||
|
void handleTeleportFinished();
|
||||||
|
private:
|
||||||
|
boost::signals2::connection mTeleportFinishedSlot;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
|
extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;
|
||||||
|
|||||||
Reference in New Issue
Block a user