#2166 Avatar does not move its lips when the corresponding checkbox is checked

meow-7.2.2
Alexander Gavriliuk 2024-09-12 20:35:35 +02:00 committed by Guru
parent 1894136e9a
commit ccbd69bf6b
3 changed files with 4 additions and 12 deletions

View File

@ -616,7 +616,6 @@ bool LLVOAvatar::sVisibleInFirstPerson = false;
F32 LLVOAvatar::sLODFactor = 1.f;
F32 LLVOAvatar::sPhysicsLODFactor = 1.f;
bool LLVOAvatar::sJointDebug = false;
bool LLVOAvatar::sLipSyncEnabled = false;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
@ -1177,7 +1176,6 @@ void LLVOAvatar::initClass()
LLControlAvatar::sRegionChangedSlot = gAgent.addRegionChangedCallback(&LLControlAvatar::onRegionChanged);
sCloudTexture = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c");
gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&LLVOAvatar::handleVOAvatarPrefsChanged, _2));
}
@ -1185,12 +1183,6 @@ void LLVOAvatar::cleanupClass()
{
}
bool LLVOAvatar::handleVOAvatarPrefsChanged(const LLSD &newvalue)
{
sLipSyncEnabled = gSavedSettings.getBOOL("LipSyncEnabled");
return true;
}
// virtual
void LLVOAvatar::initInstance()
{
@ -3112,7 +3104,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
if ( voice_enabled
&& mLastRezzedStatus > 0 // no point updating lip-sync for clouds
&& sLipSyncEnabled
&& LLVoiceVisualizer::getLipSyncEnabled()
&& LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
{
F32 ooh_morph_amount = 0.0f;

View File

@ -109,7 +109,6 @@ public:
virtual void initInstance(); // Called after construction to initialize the class.
protected:
virtual ~LLVOAvatar();
static bool handleVOAvatarPrefsChanged(const LLSD &newvalue);
/** Initialization
** **
@ -369,7 +368,6 @@ public:
static F32 sLODFactor; // user-settable LOD factor
static F32 sPhysicsLODFactor; // user-settable physics LOD factor
static bool sJointDebug; // output total number of joints being touched for each avatar
static bool sLipSyncEnabled;
static LLPointer<LLViewerTexture> sCloudTexture;

View File

@ -100,6 +100,8 @@ class LLVoiceVisualizer : public LLHUDEffect
void setMaxGesticulationAmplitude();
void setMinGesticulationAmplitude();
static bool getLipSyncEnabled() { return sLipSyncEnabled; }
//---------------------------------------------------
// private members
//---------------------------------------------------
@ -135,7 +137,7 @@ class LLVoiceVisualizer : public LLHUDEffect
// private static members
//---------------------------------------------------
static bool sLipSyncEnabled; // 0 disabled, 1 babble loop
static bool sLipSyncEnabled; // false: disabled, true: babble loop
static bool sPrefsInitialized; // the first instance will initialize the static members
static F32* sOoh; // the babble loop of amplitudes for the ooh morph
static F32* sAah; // the babble loop of amplitudes for the ooh morph