aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/llcharacter.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:57 -0500
committerJacek Antonelli2008-08-15 23:45:57 -0500
commit7e3007b63521c4b0c5bbad1c3964a557fc526ce2 (patch)
treeab231ed574db618873d6ebb25293cf7c0cb6d26e /linden/indra/llcharacter/llcharacter.cpp
parentSecond Life viewer sources 1.20.10 (diff)
downloadmeta-impy-7e3007b63521c4b0c5bbad1c3964a557fc526ce2.zip
meta-impy-7e3007b63521c4b0c5bbad1c3964a557fc526ce2.tar.gz
meta-impy-7e3007b63521c4b0c5bbad1c3964a557fc526ce2.tar.bz2
meta-impy-7e3007b63521c4b0c5bbad1c3964a557fc526ce2.tar.xz
Second Life viewer sources 1.20.11
Diffstat (limited to 'linden/indra/llcharacter/llcharacter.cpp')
-rw-r--r--linden/indra/llcharacter/llcharacter.cpp47
1 files changed, 27 insertions, 20 deletions
diff --git a/linden/indra/llcharacter/llcharacter.cpp b/linden/indra/llcharacter/llcharacter.cpp
index ad648f8..83487bc 100644
--- a/linden/indra/llcharacter/llcharacter.cpp
+++ b/linden/indra/llcharacter/llcharacter.cpp
@@ -103,11 +103,11 @@ LLJoint *LLCharacter::getJoint( const std::string &name )
103} 103}
104 104
105//----------------------------------------------------------------------------- 105//-----------------------------------------------------------------------------
106// addMotion() 106// registerMotion()
107//----------------------------------------------------------------------------- 107//-----------------------------------------------------------------------------
108BOOL LLCharacter::addMotion( const LLUUID& id, LLMotionConstructor create ) 108BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create )
109{ 109{
110 return mMotionController.addMotion(id, create); 110 return mMotionController.registerMotion(id, create);
111} 111}
112 112
113//----------------------------------------------------------------------------- 113//-----------------------------------------------------------------------------
@@ -119,7 +119,16 @@ void LLCharacter::removeMotion( const LLUUID& id )
119} 119}
120 120
121//----------------------------------------------------------------------------- 121//-----------------------------------------------------------------------------
122// getMotion() 122// findMotion()
123//-----------------------------------------------------------------------------
124LLMotion* LLCharacter::findMotion( const LLUUID &id )
125{
126 return mMotionController.findMotion( id );
127}
128
129//-----------------------------------------------------------------------------
130// createMotion()
131// NOTE: Always assign the result to a LLPointer!
123//----------------------------------------------------------------------------- 132//-----------------------------------------------------------------------------
124LLMotion* LLCharacter::createMotion( const LLUUID &id ) 133LLMotion* LLCharacter::createMotion( const LLUUID &id )
125{ 134{
@@ -168,26 +177,24 @@ void LLCharacter::requestStopMotion( LLMotion* motion)
168 177
169 178
170//----------------------------------------------------------------------------- 179//-----------------------------------------------------------------------------
171// updateMotion() 180// updateMotions()
172//----------------------------------------------------------------------------- 181//-----------------------------------------------------------------------------
173void LLCharacter::updateMotion(BOOL force_update) 182void LLCharacter::updateMotions(e_update_t update_type)
174{ 183{
175 // unpause if we're forcing an update or 184 LLFastTimer t(LLFastTimer::FTM_UPDATE_ANIMATION);
176 // number of outstanding pause requests has dropped 185 if (update_type == HIDDEN_UPDATE)
177 // to the initial one
178 if (mMotionController.isPaused() &&
179 (force_update || mPauseRequest->getNumRefs() == 1))
180 { 186 {
181 mMotionController.unpause(); 187 mMotionController.updateMotionsMinimal();
182 } 188 }
183 189 else
184 mMotionController.updateMotion();
185
186 // pause once again, after forced update, if there are outstanding
187 // pause requests
188 if (force_update && mPauseRequest->getNumRefs() > 1)
189 { 190 {
190 mMotionController.pause(); 191 // unpause if the number of outstanding pause requests has dropped to the initial one
192 if (mMotionController.isPaused() && mPauseRequest->getNumRefs() == 1)
193 {
194 mMotionController.unpauseAllMotions();
195 }
196 bool force_update = (update_type == FORCE_UPDATE);
197 mMotionController.updateMotions(force_update);
191 } 198 }
192} 199}
193 200
@@ -499,7 +506,7 @@ void LLCharacter::updateVisualParams()
499 506
500LLAnimPauseRequest LLCharacter::requestPause() 507LLAnimPauseRequest LLCharacter::requestPause()
501{ 508{
502 mMotionController.pause(); 509 mMotionController.pauseAllMotions();
503 return mPauseRequest; 510 return mPauseRequest;
504} 511}
505 512