diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-03-29 12:00:26 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-03-29 12:00:26 -0400 |
commit | 94e6e10739c8321b6fb651a109901380ef92975a (patch) | |
tree | 629fec2892c2bb0bce4f35f42ef4cad54408f174 /indra/newview/llpreviewanim.cpp | |
parent | 46fe5d49caef6c8db3df9d88f0d0ec773ef28095 (diff) |
EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar".
Diffstat (limited to 'indra/newview/llpreviewanim.cpp')
-rw-r--r-- | indra/newview/llpreviewanim.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 49b297f702..9210f5b8b7 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -71,7 +71,7 @@ BOOL LLPreviewAnim::postBuild() const LLInventoryItem* item = getItem(); if(item) { - gAgent.getAvatarObject()->createMotion(item->getAssetUUID()); // preload the animation + gAgentAvatar->createMotion(item->getAssetUUID()); // preload the animation childSetText("desc", item->getDescription()); } @@ -110,7 +110,6 @@ void LLPreviewAnim::playAnim( void *userdata ) { LLPreviewAnim* self = (LLPreviewAnim*) userdata; const LLInventoryItem *item = self->getItem(); - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); if(item) { @@ -126,7 +125,7 @@ void LLPreviewAnim::playAnim( void *userdata ) { self->mPauseRequest = NULL; gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START); - LLMotion* motion = avatarp->findMotion(itemID); + LLMotion* motion = gAgentAvatar->findMotion(itemID); if (motion) { motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle()))); @@ -134,7 +133,7 @@ void LLPreviewAnim::playAnim( void *userdata ) } else { - avatarp->stopMotion(itemID); + gAgentAvatar->stopMotion(itemID); gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); } } @@ -159,9 +158,8 @@ void LLPreviewAnim::auditionAnim( void *userdata ) if (self->childGetValue("Anim audition btn").asBoolean() ) { self->mPauseRequest = NULL; - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - gAgent.getAvatarObject()->startMotion(item->getAssetUUID()); - LLMotion* motion = avatarp->findMotion(itemID); + gAgentAvatar->startMotion(item->getAssetUUID()); + LLMotion* motion = gAgentAvatar->findMotion(itemID); if (motion) { @@ -170,7 +168,7 @@ void LLPreviewAnim::auditionAnim( void *userdata ) } else { - gAgent.getAvatarObject()->stopMotion(itemID); + gAgentAvatar->stopMotion(itemID); gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); } } @@ -183,11 +181,9 @@ void LLPreviewAnim::onClose(bool app_quitting) if(item) { - gAgent.getAvatarObject()->stopMotion(item->getAssetUUID()); + gAgentAvatar->stopMotion(item->getAssetUUID()); gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP); - - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - LLMotion* motion = avatarp->findMotion(item->getAssetUUID()); + LLMotion* motion = gAgentAvatar->findMotion(item->getAssetUUID()); if (motion) { |