suport avatar hide title option

This commit is contained in:
UbitUmarov
2022-05-10 04:21:34 +01:00
parent c5f1b09cbe
commit f1f6c2094e

View File

@@ -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<Vector3> coarseLocations, List<UUID> 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;
/// <summary>
@@ -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