From 72be9eaa8b3e2a7be5f57d93688a7d31fc46eb7d Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 15 Aug 2014 21:46:28 +0100 Subject: [PATCH] If a user moves back in sight of a child region before the agent has been closed on teleport, don't unnecessarily resend all avatar and object data about that region. --- OpenSim/Framework/ISceneAgent.cs | 5 +++++ OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenSim/Framework/ISceneAgent.cs b/OpenSim/Framework/ISceneAgent.cs index 1e8f896c50..ca1399c784 100644 --- a/OpenSim/Framework/ISceneAgent.cs +++ b/OpenSim/Framework/ISceneAgent.cs @@ -65,6 +65,11 @@ namespace OpenSim.Framework /// AvatarAppearance Appearance { get; set; } + /// + /// Set if initial data about the scene (avatars, objects) has been sent to the client. + /// + bool SentInitialDataToClient { get; } + /// /// Send initial scene data to the client controlling this agent /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 0df22bf72d..708a0a1d04 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1740,7 +1740,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); bool tp = (aCircuit.teleportFlags > 0); // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from - if (!tp) + if (!tp && !client.SceneAgent.SentInitialDataToClient) client.SceneAgent.SendInitialDataToClient(); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 025ae38dad..9d398ca67b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -286,9 +286,6 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// Set if initial data about the scene (avatars, objects) has been sent to the ControllingClient. - /// public bool SentInitialDataToClient { get; private set; } /// @@ -3350,9 +3347,9 @@ namespace OpenSim.Region.Framework.Scenes // Send all scene object to the new client Util.RunThreadNoTimeout(delegate { - m_log.DebugFormat( - "[SCENE PRESENCE]: Sending initial data to {0} agent {1} in {2}, tp flags {3}", - IsChildAgent ? "child" : "root", Name, Scene.Name, m_teleportFlags); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Sending initial data to {0} agent {1} in {2}, tp flags {3}", +// IsChildAgent ? "child" : "root", Name, Scene.Name, m_teleportFlags); // we created a new ScenePresence (a new child agent) in a fresh region. // Request info about all the (root) agents in this region