From c3e8c1f738b14de74b23b3a7276ef4dc083c0887 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 24 Sep 2009 13:46:02 -0400 Subject: Disable MSVC "fatal warning" 4702 for boost::lexical_cast in Release build --- indra/newview/llvoavatarself.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index a7b5b60842..31b9f062e4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -30,6 +30,12 @@ * $/LicenseInfo$ */ +#if LL_MSVC +// disable warning about boost::lexical_cast returning uninitialized data +// when it fails to parse the string +#pragma warning (disable:4701) +#endif + #include "llviewerprecompiledheaders.h" #include "llvoavatarself.h" @@ -83,7 +89,12 @@ #include "llvoiceclient.h" #include "llvoicevisualizer.h" // Ventrella -#include "boost/lexical_cast.hpp" +#if LL_MSVC +// disable boost::lexical_cast warning +#pragma warning (disable:4702) +#endif + +#include using namespace LLVOAvatarDefines; -- cgit v1.2.3 From 65f534899740018b8efb662f8154030edb07fc0f Mon Sep 17 00:00:00 2001 From: "nyx@NyxTop" Date: Thu, 29 Oct 2009 15:13:27 -0400 Subject: EXT-1945 visual parameter animations broken First round of fixes for trying to fix the visual param animations Code reviewed by Seraph --- indra/newview/llvoavatarself.cpp | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4760d5a472..758db538a2 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -193,6 +193,25 @@ void LLVOAvatarSelf::markDead() LLVOAvatar::markDead(); } +/*virtual*/ BOOL LLVOAvatarSelf::loadAvatar() +{ + BOOL success = LLVOAvatar::loadAvatar(); + + // set all parameters sotred directly in the avatar to have + // the isSelfParam to be TRUE - this is used to prevent + // them from being animated or trigger accidental rebakes + // when we copy params from the wearable to the base avatar. + for (LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); + param; + param = (LLViewerVisualParam*) getNextVisualParam()) + { + param->setIsDummy(TRUE); + } + + return success; +} + + BOOL LLVOAvatarSelf::loadAvatarSelf() { BOOL success = TRUE; @@ -704,16 +723,23 @@ void LLVOAvatarSelf::updateVisualParams() } } - LLWearable *shape = gAgentWearables.getWearable(WT_SHAPE,0); - if (shape) - { - F32 gender = shape->getVisualParamWeight(80); // param 80 == gender - setVisualParamWeight("male",gender ,TRUE); - } - LLVOAvatar::updateVisualParams(); } +/*virtual*/ +void LLVOAvatarSelf::idleUpdateAppearanceAnimation() +{ + // Animate all top-level wearable visual parameters + gAgentWearables.animateAllWearableParams(calcMorphAmount(), mAppearanceAnimSetByUser); + + // apply wearable visual params to avatar + updateVisualParams(); + + //allow avatar to process updates + LLVOAvatar::idleUpdateAppearanceAnimation(); + +} + // virtual void LLVOAvatarSelf::requestStopMotion(LLMotion* motion) { -- cgit v1.2.3