From f61e54892f2284b6f89bacf3069467c05b2eea11 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 8 Dec 2011 18:34:23 +0000
Subject: On a new client circuit, send the initial reply ack to let the client
know it's live before sending other data.
This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before.
This may stop some avatars appearing grey on login.
This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity
This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
---
OpenSim/Region/Framework/Scenes/Scene.cs | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 21c4a87..d47536a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2491,13 +2491,13 @@ namespace OpenSim.Region.Framework.Scenes
///
///
/// The type of agent to add.
- public override void AddNewClient(IClientAPI client, PresenceType type)
+ public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type)
{
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
bool vialogin = false;
if (aCircuit == null) // no good, didn't pass NewUserConnection successfully
- return;
+ return null;
vialogin = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 ||
(aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
@@ -2552,16 +2552,7 @@ namespace OpenSim.Region.Framework.Scenes
if (vialogin)
EventManager.TriggerOnClientLogin(client);
- // Send all scene object to the new client
- Util.FireAndForget(delegate
- {
- EntityBase[] entities = Entities.GetEntities();
- foreach(EntityBase e in entities)
- {
- if (e != null && e is SceneObjectGroup)
- ((SceneObjectGroup)e).SendFullUpdateToClient(client);
- }
- });
+ return sp;
}
///
--
cgit v1.1