summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-29 12:11:51 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-29 12:11:51 -0400
commit58d76a9ecf83b49e42fabfada27ca20814f93cf3 (patch)
treef027ead1a5f4709f755a741e1acccf562d89d920 /indra/newview/lltooldraganddrop.cpp
parent94e6e10739c8321b6fb651a109901380ef92975a (diff)
EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "gAgentAvatar" with "gAgentAvatarp".
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index f9d0c7c307..c3aba4e591 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1174,7 +1174,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
// VEFFECT: SetScript
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(hit_obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -1335,7 +1335,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
// VEFFECT: DropObject
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setPositionGlobal(mLastHitPos);
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -1398,7 +1398,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
// VEFFECT: AddToInventory
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(hit_obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -1496,7 +1496,7 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent,
// VEFFECT: giveInventory
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(gObjectList.findObject(to_agent));
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -1735,7 +1735,7 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent,
// VEFFECT: giveInventoryCategory
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(gObjectList.findObject(to_agent));
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -1767,7 +1767,7 @@ BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
acceptable = FALSE;
}
@@ -1810,7 +1810,7 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
acceptable = FALSE;
}
@@ -1848,7 +1848,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (isAgentAvatarValid() && gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
worn = TRUE;
}
@@ -1999,7 +1999,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
}
// must not be already wearing it
- if (!isAgentAvatarValid() || gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
return ACCEPT_NO;
}
@@ -2040,7 +2040,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
locateInventory(item, cat);
if (!item || !item->isComplete()) return ACCEPT_NO;
- if (!isAgentAvatarValid() || gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
return ACCEPT_NO;
}
@@ -2101,7 +2101,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
if (!item || !item->isComplete()) return ACCEPT_NO;
- if (!isAgentAvatarValid() || gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
return ACCEPT_NO;
}
@@ -2250,7 +2250,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
// VEFFECT: SetTexture
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
- effectp->setSourceObject(gAgentAvatar);
+ effectp->setSourceObject(gAgentAvatarp);
effectp->setTargetObject(obj);
effectp->setDuration(LL_HUD_DUR_SHORT);
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -2610,7 +2610,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
// cannot give away no-transfer objects
return ACCEPT_NO;
}
- if (isAgentAvatarValid() && gAgentAvatar->isWearingAttachment(item->getUUID()))
+ if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
// You can't give objects that are attached to you
return ACCEPT_NO;