summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-09-12 20:35:35 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2024-09-12 21:48:49 +0200
commitccbd69bf6b287861b41fdb00e9d372746dfc2702 (patch)
tree64c51145dfaf82330542fbafac96b3c2b036ba34 /indra
parent1894136e9a6e25b27acfffdc2a92afc08fce012a (diff)
#2166 Avatar does not move its lips when the corresponding checkbox is checked
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoavatar.cpp10
-rw-r--r--indra/newview/llvoavatar.h2
-rw-r--r--indra/newview/llvoicevisualizer.h4
3 files changed, 4 insertions, 12 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1b52e4f870..8e8cf7424f 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -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;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2efb232704..a93ccf46bf 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -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;
diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h
index a44f60bd16..b788691a4f 100644
--- a/indra/newview/llvoicevisualizer.h
+++ b/indra/newview/llvoicevisualizer.h
@@ -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