Merge branch 'master' of git://github.com/Shyotl/SingularityViewer

This commit is contained in:
Inusaito Sayori
2014-08-05 00:34:06 -04:00
2 changed files with 28 additions and 0 deletions

View File

@@ -54,6 +54,7 @@
#include "llviewermedia.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llviewerstats.h"
#include "llviewerregion.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.
mTeleportFinishedSlot = LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&LLVOAvatarSelf::handleTeleportFinished, this));
lldebugs << "Marking avatar as self " << id << llendl;
}
@@ -3289,3 +3292,23 @@ void LLVOAvatarSelf::setInvisible(bool invisible)
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);
}
}
}
}
}

View File

@@ -429,6 +429,11 @@ private:
public:
static void onChangeSelfInvisible(bool invisible);
void setInvisible(bool invisible);
private:
void handleTeleportFinished();
private:
boost::signals2::connection mTeleportFinishedSlot;
};
extern LLPointer<LLVOAvatarSelf> gAgentAvatarp;