diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0241efdca7..23194aea20 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -70,16 +70,23 @@ namespace OpenSim.Region.Framework.Scenes public ScriptControlled eventControls; } + enum AgentUpdateFlags: byte + { + None = 0, + HideTitle = 1, + CliAutoPilot = 2 + } + public delegate void SendCoarseLocationsMethod(UUID scene, ScenePresence presence, List coarseLocations, List avatarUUIDs); public class ScenePresence : EntityBase, IScenePresence, IDisposable { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - // ~ScenePresence() - // { - // m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); - // } + //~ScenePresence() + //{ + // m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); + //} public bool GotAttachmentsData = false; public int EnvironmentVersion = -1; @@ -135,6 +142,8 @@ namespace OpenSim.Region.Framework.Scenes } } + public bool HideTitle = false; + private ScenePresenceStateMachine m_stateMachine; /// @@ -2636,6 +2645,13 @@ namespace OpenSim.Region.Framework.Scenes ACFlags allFlags = (ACFlags)agentData.ControlFlags; + bool newHideTitle = (agentData.Flags & (byte)AgentUpdateFlags.HideTitle) != 0; + if(HideTitle != newHideTitle) + { + HideTitle = newHideTitle; + SendAvatarDataToAllAgents(); + } + // FIXME: This does not work as intended because the viewer only sends the lbutton down when the button // is first pressed, not whilst it is held down. If this is required in the future then need to look // for an AGENT_CONTROL_LBUTTON_UP event and make sure to handle cases where an initial DOWN is not