Fix lookat and pointat shared experience.
There was a bug that when people turned off sending viewer effects, they'd also turn off sending LookAt, while there is a seperate checkbox to turn THAT off, while still seeing their own avatar happily look around, breaking shared experience (most notably, most people will be complete oblivious of the fact that they look like zombies to others and that their friends do not see the same thing on their screen). This patch fixes this: both parties now see the same thing. Lookat and PointAt are only turned off by their respective checkboxes, and no longer silently influenced by turning off other viewer effects.
This commit is contained in:
@@ -80,14 +80,33 @@ void LLHUDManager::updateEffects()
|
||||
|
||||
void LLHUDManager::sendEffects()
|
||||
{
|
||||
static LLCachedControl<bool> disable_lookat_effect(gSavedSettings, "PrivateLookAt", false);
|
||||
static LLCachedControl<bool> disable_pointat_effect(gSavedSettings, "DisablePointAtAndBeam", false);
|
||||
static LLCachedControl<bool> broadcast_viewer_effects(gSavedSettings, "BroadcastViewerEffects", true);
|
||||
|
||||
if(!gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||
return;
|
||||
|
||||
S32 i;
|
||||
for (i = 0; i < mHUDEffects.count(); i++)
|
||||
{
|
||||
LLHUDEffect *hep = mHUDEffects[i];
|
||||
if (hep->mType == LLHUDObject::LL_HUD_EFFECT_LOOKAT)
|
||||
{
|
||||
if (disable_lookat_effect)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (hep->mType == LLHUDObject::LL_HUD_EFFECT_POINTAT ||
|
||||
hep->mType == LLHUDObject::LL_HUD_EFFECT_BEAM)
|
||||
{
|
||||
if (disable_pointat_effect)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (!broadcast_viewer_effects)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (hep->isDead())
|
||||
{
|
||||
llwarns << "Trying to send dead effect!" << llendl;
|
||||
|
||||
Reference in New Issue
Block a user