summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp59
1 files changed, 10 insertions, 49 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 758db538a2..85a68fdd3f 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -41,53 +41,22 @@
#include "llvoavatarself.h"
#include "llvoavatar.h"
-#include <stdio.h>
-#include <ctype.h>
-
-#include "llaudioengine.h"
-#include "noise.h"
+#include "pipeline.h"
-// TODO: Seraph - Remove unnecessary headers. These are copied from llvoavatar.h.
#include "llagent.h" // Get state values from here
#include "llagentwearables.h"
-#include "llviewercontrol.h"
-#include "lldrawpoolavatar.h"
-#include "lldriverparam.h"
-#include "lleditingmotion.h"
-#include "llemote.h"
-#include "llface.h"
-#include "llfirstuse.h"
-#include "llheadrotmotion.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llkeyframefallmotion.h"
-#include "llkeyframestandmotion.h"
-#include "llkeyframewalkmotion.h"
-#include "llmutelist.h"
#include "llselectmgr.h"
-#include "llsprite.h"
-#include "lltargetingmotion.h"
-#include "lltexlayer.h"
-#include "lltexglobalcolor.h"
#include "lltoolgrab.h" // for needsRenderBeam
#include "lltoolmgr.h" // for needsRenderBeam
#include "lltoolmorph.h"
#include "lltrans.h"
#include "llviewercamera.h"
-#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
-#include "llviewerparcelmgr.h"
#include "llviewerstats.h"
-#include "llvovolume.h"
-#include "llworld.h"
-#include "pipeline.h"
-#include "llviewershadermgr.h"
-#include "llsky.h"
-#include "llanimstatelabels.h"
-#include "llgesturemgr.h" //needed to trigger the voice gesticulations
-#include "llvoiceclient.h"
-#include "llvoicevisualizer.h" // Ventrella
+#include "llviewerregion.h"
#include "llappearancemgr.h"
#if LL_MSVC
@@ -205,7 +174,10 @@ void LLVOAvatarSelf::markDead()
param;
param = (LLViewerVisualParam*) getNextVisualParam())
{
- param->setIsDummy(TRUE);
+ if (param->getWearableType() != WT_INVALID)
+ {
+ param->setIsDummy(TRUE);
+ }
}
return success;
@@ -1080,15 +1052,8 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
if (attachment->isObjectAttached(viewer_object))
{
const LLUUID& attachment_id = viewer_object->getItemID();
- LLViewerInventoryItem *item = gInventory.getItem(attachment_id);
- if (item)
- {
- LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:");
- LLAppearanceManager::wearItem(item,false); // Add COF link for item.
- gInventory.addChangedMask(LLInventoryObserver::LABEL, attachment_id);
- }
+ LLAppearanceManager::registerAttachment(attachment_id);
}
- gInventory.notifyObservers();
return attachment;
}
@@ -1096,12 +1061,12 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
//virtual
BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
{
- const LLUUID item_id = viewer_object->getItemID();
+ const LLUUID attachment_id = viewer_object->getItemID();
if (LLVOAvatar::detachObject(viewer_object))
{
// the simulator should automatically handle permission revocation
- stopMotionFromSource(item_id);
+ stopMotionFromSource(attachment_id);
LLFollowCamMgr::setCameraActive(viewer_object->getID(), FALSE);
LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
@@ -1126,13 +1091,9 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
}
else
{
- LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
- LLAppearanceManager::removeItemLinks(item_id, false);
+ LLAppearanceManager::unregisterAttachment(attachment_id);
}
- // BAP - needs to change for label to track link.
- gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
- gInventory.notifyObservers();
return TRUE;
}
return FALSE;