summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewanim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewanim.cpp')
-rw-r--r--indra/newview/llpreviewanim.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 0cc747f789..262961b73b 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
+ gAgentAvatarp->createMotion(item->getAssetUUID()); // preload the animation
childSetText("desc", item->getDescription());
}
@@ -125,10 +125,7 @@ void LLPreviewAnim::playAnim( void *userdata )
{
self->mPauseRequest = NULL;
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
-
- LLVOAvatar* avatar = gAgent.getAvatarObject();
- LLMotion* motion = avatar->findMotion(itemID);
-
+ LLMotion* motion = gAgentAvatarp->findMotion(itemID);
if (motion)
{
motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
@@ -136,7 +133,7 @@ void LLPreviewAnim::playAnim( void *userdata )
}
else
{
- gAgent.getAvatarObject()->stopMotion(itemID);
+ gAgentAvatarp->stopMotion(itemID);
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
}
}
@@ -161,10 +158,8 @@ void LLPreviewAnim::auditionAnim( void *userdata )
if (self->childGetValue("Anim audition btn").asBoolean() )
{
self->mPauseRequest = NULL;
- gAgent.getAvatarObject()->startMotion(item->getAssetUUID());
-
- LLVOAvatar* avatar = gAgent.getAvatarObject();
- LLMotion* motion = avatar->findMotion(itemID);
+ gAgentAvatarp->startMotion(item->getAssetUUID());
+ LLMotion* motion = gAgentAvatarp->findMotion(itemID);
if (motion)
{
@@ -173,7 +168,7 @@ void LLPreviewAnim::auditionAnim( void *userdata )
}
else
{
- gAgent.getAvatarObject()->stopMotion(itemID);
+ gAgentAvatarp->stopMotion(itemID);
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
}
}
@@ -186,11 +181,9 @@ void LLPreviewAnim::onClose(bool app_quitting)
if(item)
{
- gAgent.getAvatarObject()->stopMotion(item->getAssetUUID());
+ gAgentAvatarp->stopMotion(item->getAssetUUID());
gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP);
-
- LLVOAvatar* avatar = gAgent.getAvatarObject();
- LLMotion* motion = avatar->findMotion(item->getAssetUUID());
+ LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID());
if (motion)
{