From e38ec797fda86206b01fc1d3d59b000f0efa2652 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Wed, 4 Dec 2013 22:40:07 +0100 Subject: [PATCH] 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. --- indra/newview/llhudmanager.cpp | 25 ++++++++++++++++--- indra/newview/llvoavatarself.cpp | 6 ++--- .../en-us/panel_preferences_ascent_system.xml | 4 +-- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index cb9a2c1d3..15872a0db 100644 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -80,14 +80,33 @@ void LLHUDManager::updateEffects() void LLHUDManager::sendEffects() { + static LLCachedControl disable_lookat_effect(gSavedSettings, "PrivateLookAt", false); + static LLCachedControl disable_pointat_effect(gSavedSettings, "DisablePointAtAndBeam", false); + static LLCachedControl 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; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6f0a4bd9f..c3ead99db 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -897,9 +897,9 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) //virtual void LLVOAvatarSelf::idleUpdateTractorBeam() { - - - if(gSavedSettings.getBOOL("DisablePointAtAndBeam")) + // + static LLCachedControl disable_pointat_effect("DisablePointAtAndBeam"); + if (disable_pointat_effect) { return; } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index e4d6537c0..72a5362fc 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -83,9 +83,9 @@ - + - +