diff options
author | Dave Parks <davep@lindenlab.com> | 2012-11-08 14:23:34 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-11-08 14:23:34 -0600 |
commit | ccad8c9411977287f1c42b288bf796308de81094 (patch) | |
tree | d114771df8469e4c9df6a9ecdd22edcbba7f24a0 /indra/llcharacter | |
parent | c431ddf629b7f1149c44b2063d216dd34bcd2b12 (diff) | |
parent | 2126cdb9a25da4dcc4c81659038b85bcff17c4ee (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-lion
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 3 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.h | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 829dda9993..e9fb91ad73 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -42,6 +42,7 @@ const U32 MAX_MOTION_INSTANCES = 32; //----------------------------------------------------------------------------- // Constants and statics //----------------------------------------------------------------------------- +F32 LLMotionController::sCurrentTimeFactor = 1.f; LLMotionRegistry LLMotionController::sRegistry; //----------------------------------------------------------------------------- @@ -125,7 +126,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id ) // Class Constructor //----------------------------------------------------------------------------- LLMotionController::LLMotionController() - : mTimeFactor(1.f), + : mTimeFactor(sCurrentTimeFactor), mCharacter(NULL), mAnimTime(0.f), mPrevTimerElapsed(0.f), diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index b996f708d2..52eaf557b1 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -168,6 +168,9 @@ public: const LLFrameTimer& getFrameTimer() { return mTimer; } + static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; }; + static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; }; + protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap @@ -187,7 +190,8 @@ protected: void deactivateStoppedMotions(); protected: - F32 mTimeFactor; + F32 mTimeFactor; // 1.f for normal speed + static F32 sCurrentTimeFactor; // Value to use for initialization static LLMotionRegistry sRegistry; LLPoseBlender mPoseBlender; |