summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llcharacter.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-27 21:02:01 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-27 21:02:01 +0000
commit926ea0b39afd04cab469ca17b28f95ebf969e669 (patch)
tree40d5653e19160f72e7a0b80fadb9bdb93ef3575c /indra/llcharacter/llcharacter.cpp
parent41877d457ab9542dca22b99f3eddb1bfcfe7c1d6 (diff)
QAR-669 1.20 Viewer RC11
QAR-648 1.20 Viewer RC10 merge Branch_1-20-Viewer-2 -r 88724:90511 -> release
Diffstat (limited to 'indra/llcharacter/llcharacter.cpp')
-rw-r--r--indra/llcharacter/llcharacter.cpp47
1 files changed, 27 insertions, 20 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 033ac16274..1d5947c9ef 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -103,11 +103,11 @@ LLJoint *LLCharacter::getJoint( const std::string &name )
}
//-----------------------------------------------------------------------------
-// addMotion()
+// registerMotion()
//-----------------------------------------------------------------------------
-BOOL LLCharacter::addMotion( const LLUUID& id, LLMotionConstructor create )
+BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
{
- return mMotionController.addMotion(id, create);
+ return mMotionController.registerMotion(id, create);
}
//-----------------------------------------------------------------------------
@@ -119,7 +119,16 @@ void LLCharacter::removeMotion( const LLUUID& id )
}
//-----------------------------------------------------------------------------
-// getMotion()
+// findMotion()
+//-----------------------------------------------------------------------------
+LLMotion* LLCharacter::findMotion( const LLUUID &id )
+{
+ return mMotionController.findMotion( id );
+}
+
+//-----------------------------------------------------------------------------
+// createMotion()
+// NOTE: Always assign the result to a LLPointer!
//-----------------------------------------------------------------------------
LLMotion* LLCharacter::createMotion( const LLUUID &id )
{
@@ -168,26 +177,24 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
//-----------------------------------------------------------------------------
-// updateMotion()
+// updateMotions()
//-----------------------------------------------------------------------------
-void LLCharacter::updateMotion(BOOL force_update)
+void LLCharacter::updateMotions(e_update_t update_type)
{
- // unpause if we're forcing an update or
- // number of outstanding pause requests has dropped
- // to the initial one
- if (mMotionController.isPaused() &&
- (force_update || mPauseRequest->getNumRefs() == 1))
+ LLFastTimer t(LLFastTimer::FTM_UPDATE_ANIMATION);
+ if (update_type == HIDDEN_UPDATE)
{
- mMotionController.unpause();
+ mMotionController.updateMotionsMinimal();
}
-
- mMotionController.updateMotion();
-
- // pause once again, after forced update, if there are outstanding
- // pause requests
- if (force_update && mPauseRequest->getNumRefs() > 1)
+ else
{
- mMotionController.pause();
+ // unpause if the number of outstanding pause requests has dropped to the initial one
+ if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
+ {
+ mMotionController.unpauseAllMotions();
+ }
+ bool force_update = (update_type == FORCE_UPDATE);
+ mMotionController.updateMotions(force_update);
}
}
@@ -499,7 +506,7 @@ void LLCharacter::updateVisualParams()
LLAnimPauseRequest LLCharacter::requestPause()
{
- mMotionController.pause();
+ mMotionController.pauseAllMotions();
return mPauseRequest;
}