diff options
Diffstat (limited to 'linden/indra/newview/llvoavatar.cpp')
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 70 |
1 files changed, 32 insertions, 38 deletions
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 7113177..25c6eb6 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 5 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 6 | * |
7 | * Second Life Viewer Source Code | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | 8 | * The source code in this file ("Source Code") is provided by Linden Lab |
8 | * to you under the terms of the GNU General Public License, version 2.0 | 9 | * to you under the terms of the GNU General Public License, version 2.0 |
9 | * ("GPL"), unless you have obtained a separate licensing agreement | 10 | * ("GPL"), unless you have obtained a separate licensing agreement |
@@ -109,6 +110,7 @@ | |||
109 | #include "llwearablelist.h" | 110 | #include "llwearablelist.h" |
110 | #include "llworld.h" | 111 | #include "llworld.h" |
111 | #include "pipeline.h" | 112 | #include "pipeline.h" |
113 | #include "llglslshader.h" | ||
112 | #include "viewer.h" | 114 | #include "viewer.h" |
113 | #include "lscript_byteformat.h" | 115 | #include "lscript_byteformat.h" |
114 | 116 | ||
@@ -2575,7 +2577,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) | |||
2575 | } | 2577 | } |
2576 | 2578 | ||
2577 | // update wind effect | 2579 | // update wind effect |
2578 | if ((gPipeline.getVertexShaderLevel(LLPipeline::SHADER_AVATAR) >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH)) | 2580 | if ((LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_AVATAR) >= LLDrawPoolAvatar::SHADER_LEVEL_CLOTH)) |
2579 | { | 2581 | { |
2580 | F32 hover_strength = 0.f; | 2582 | F32 hover_strength = 0.f; |
2581 | F32 time_delta = mRippleTimer.getElapsedTimeF32() - mRippleTimeLast; | 2583 | F32 time_delta = mRippleTimer.getElapsedTimeF32() - mRippleTimeLast; |
@@ -3034,38 +3036,30 @@ void LLVOAvatar::updateCharacter(LLAgent &agent) | |||
3034 | 3036 | ||
3035 | // clear debug text | 3037 | // clear debug text |
3036 | mDebugText.clear(); | 3038 | mDebugText.clear(); |
3037 | |||
3038 | if (LLVOAvatar::sShowAnimationDebug) | 3039 | if (LLVOAvatar::sShowAnimationDebug) |
3039 | { | 3040 | { |
3040 | LLString playing_anims; | 3041 | for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin(); |
3041 | for (LLMotion* motionp = mMotionController.getFirstActiveMotion(); | 3042 | iter != mMotionController.getActiveMotions().end(); ++iter) |
3042 | motionp; | 3043 | { |
3043 | motionp = mMotionController.getNextActiveMotion()) | 3044 | LLMotion* motionp = *iter; |
3045 | if (motionp->getMinPixelArea() < getPixelArea()) | ||
3044 | { | 3046 | { |
3045 | if (motionp->getMinPixelArea() < getPixelArea()) | 3047 | std::string output; |
3048 | if (motionp->getName().empty()) | ||
3046 | { | 3049 | { |
3047 | char output[MAX_STRING]; /* Flawfinder: ignore */ | 3050 | output = llformat("%s - %d", |
3048 | if (motionp->getName().empty()) | 3051 | motionp->getID().asString().c_str(), |
3049 | { | 3052 | (U32)motionp->getPriority()); |
3050 | snprintf( /* Flawfinder: ignore */ | ||
3051 | output, | ||
3052 | MAX_STRING, | ||
3053 | "%s - %d", | ||
3054 | motionp->getID().asString().c_str(), | ||
3055 | (U32)motionp->getPriority()); | ||
3056 | } | ||
3057 | else | ||
3058 | { | ||
3059 | snprintf( /* Flawfinder: ignore */ | ||
3060 | output, | ||
3061 | MAX_STRING, | ||
3062 | "%s - %d", | ||
3063 | motionp->getName().c_str(), | ||
3064 | (U32)motionp->getPriority()); | ||
3065 | } | ||
3066 | addDebugText(output); | ||
3067 | } | 3053 | } |
3054 | else | ||
3055 | { | ||
3056 | output = llformat("%s - %d", | ||
3057 | motionp->getName().c_str(), | ||
3058 | (U32)motionp->getPriority()); | ||
3059 | } | ||
3060 | addDebugText(output); | ||
3068 | } | 3061 | } |
3062 | } | ||
3069 | } | 3063 | } |
3070 | 3064 | ||
3071 | if (gNoRender) | 3065 | if (gNoRender) |
@@ -3086,6 +3080,13 @@ void LLVOAvatar::updateCharacter(LLAgent &agent) | |||
3086 | return; | 3080 | return; |
3087 | } | 3081 | } |
3088 | 3082 | ||
3083 | // For fading out the names above heads, only let the timer | ||
3084 | // run if we're visible. | ||
3085 | if (mDrawable.notNull() && !mDrawable->isVisible()) | ||
3086 | { | ||
3087 | mTimeVisible.reset(); | ||
3088 | } | ||
3089 | |||
3089 | if (!mIsSelf && !isVisible()) | 3090 | if (!mIsSelf && !isVisible()) |
3090 | { | 3091 | { |
3091 | return; | 3092 | return; |
@@ -3116,13 +3117,6 @@ void LLVOAvatar::updateCharacter(LLAgent &agent) | |||
3116 | getOffObject(); | 3117 | getOffObject(); |
3117 | } | 3118 | } |
3118 | 3119 | ||
3119 | // For fading out the names above heads, only let the timer | ||
3120 | // run if we're visible. | ||
3121 | if (mDrawable.notNull() && !mDrawable->isVisible()) | ||
3122 | { | ||
3123 | mTimeVisible.reset(); | ||
3124 | } | ||
3125 | |||
3126 | //-------------------------------------------------------------------- | 3120 | //-------------------------------------------------------------------- |
3127 | // create local variables in world coords for region position values | 3121 | // create local variables in world coords for region position values |
3128 | //-------------------------------------------------------------------- | 3122 | //-------------------------------------------------------------------- |
@@ -4611,7 +4605,7 @@ S32 LLVOAvatar::getCollisionVolumeID(std::string &name) | |||
4611 | //----------------------------------------------------------------------------- | 4605 | //----------------------------------------------------------------------------- |
4612 | // addDebugText() | 4606 | // addDebugText() |
4613 | //----------------------------------------------------------------------------- | 4607 | //----------------------------------------------------------------------------- |
4614 | void LLVOAvatar::addDebugText(const char* text) | 4608 | void LLVOAvatar::addDebugText(const std::string& text) |
4615 | { | 4609 | { |
4616 | mDebugText.append(1, '\n'); | 4610 | mDebugText.append(1, '\n'); |
4617 | mDebugText.append(text); | 4611 | mDebugText.append(text); |
@@ -6355,7 +6349,7 @@ BOOL LLVOAvatar::getLocalTextureRaw(S32 index, LLImageRaw* image_raw) | |||
6355 | } | 6349 | } |
6356 | else | 6350 | else |
6357 | { | 6351 | { |
6358 | if( mLocalTexture[ index ]->readBackRaw(-1, image_raw) ) | 6352 | if( mLocalTexture[ index ]->readBackRaw(-1, image_raw, false) ) |
6359 | { | 6353 | { |
6360 | success = TRUE; | 6354 | success = TRUE; |
6361 | } | 6355 | } |
@@ -9210,7 +9204,7 @@ void LLVOAvatar::writeCAL3D(std::string& path, std::string& file_base) | |||
9210 | continue; | 9204 | continue; |
9211 | } | 9205 | } |
9212 | LLPointer<LLImageRaw> raw_image = new LLImageRaw; | 9206 | LLPointer<LLImageRaw> raw_image = new LLImageRaw; |
9213 | viewer_imagep->readBackRaw(-1, raw_image); | 9207 | viewer_imagep->readBackRaw(-1, raw_image, false); |
9214 | BOOL success = tga_image->encode(raw_image); | 9208 | BOOL success = tga_image->encode(raw_image); |
9215 | success = tga_image->save(filename); | 9209 | success = tga_image->save(filename); |
9216 | } | 9210 | } |
@@ -9225,7 +9219,7 @@ void LLVOAvatar::writeCAL3D(std::string& path, std::string& file_base) | |||
9225 | else | 9219 | else |
9226 | { | 9220 | { |
9227 | LLPointer<LLImageRaw> raw_image = new LLImageRaw; | 9221 | LLPointer<LLImageRaw> raw_image = new LLImageRaw; |
9228 | viewer_imagep->readBackRaw(-1, raw_image); | 9222 | viewer_imagep->readBackRaw(-1, raw_image, false); |
9229 | BOOL success = tga_image->encode(raw_image); | 9223 | BOOL success = tga_image->encode(raw_image); |
9230 | success = tga_image->save(filename); | 9224 | success = tga_image->save(filename); |
9231 | } | 9225 | } |