diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-07-04 16:25:41 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-07-04 16:25:41 +0300 |
commit | c8fc414ebe3c44af36ae8f34d27758480ba73b1b (patch) | |
tree | 84d52bb46ad027d05936e4f43d163a4d52b3f54a /indra | |
parent | d80981de767e2ae34eb7dde9ad367fa360890215 (diff) |
MAINT-7329 Viewer was spamming log with motion limit messages
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 9 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index d8185aa693..35e76f1d9d 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -139,7 +139,8 @@ LLMotionController::LLMotionController() mTimeStep(0.f), mTimeStepCount(0), mLastInterp(0.f), - mIsSelf(FALSE) + mIsSelf(FALSE), + mLastCountAfterPurge(0) { } @@ -238,10 +239,12 @@ void LLMotionController::purgeExcessMotions() } } - if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES) + U32 loaded_count = mLoadedMotions.size(); + if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge) { - LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL; + LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL; } + mLastCountAfterPurge = loaded_count; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 72de331694..9d9c64f4f0 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -224,6 +224,8 @@ protected: F32 mLastInterp; U8 mJointSignature[2][LL_CHARACTER_MAX_ANIMATED_JOINTS]; +private: + U32 mLastCountAfterPurge; //for logging and debugging purposes }; //----------------------------------------------------------------------------- |