aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-08 18:34:23 +0000
committerJustin Clark-Casey (justincc)2011-12-08 18:34:23 +0000
commitf61e54892f2284b6f89bacf3069467c05b2eea11 (patch)
tree87cb0933707a8e02f920910c7669273232021470 /OpenSim/Region/Framework/Scenes/Scene.cs
parentSimplify Scene.AddNewClient() (diff)
downloadopensim-SC-f61e54892f2284b6f89bacf3069467c05b2eea11.zip
opensim-SC-f61e54892f2284b6f89bacf3069467c05b2eea11.tar.gz
opensim-SC-f61e54892f2284b6f89bacf3069467c05b2eea11.tar.bz2
opensim-SC-f61e54892f2284b6f89bacf3069467c05b2eea11.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
1 files changed, 3 insertions, 12 deletions
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
2491 /// </summary> 2491 /// </summary>
2492 /// <param name="client"></param> 2492 /// <param name="client"></param>
2493 /// <param name="type">The type of agent to add.</param> 2493 /// <param name="type">The type of agent to add.</param>
2494 public override void AddNewClient(IClientAPI client, PresenceType type) 2494 public override ISceneAgent AddNewClient(IClientAPI client, PresenceType type)
2495 { 2495 {
2496 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); 2496 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
2497 bool vialogin = false; 2497 bool vialogin = false;
2498 2498
2499 if (aCircuit == null) // no good, didn't pass NewUserConnection successfully 2499 if (aCircuit == null) // no good, didn't pass NewUserConnection successfully
2500 return; 2500 return null;
2501 2501
2502 vialogin = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 || 2502 vialogin = (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 ||
2503 (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; 2503 (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0;
@@ -2552,16 +2552,7 @@ namespace OpenSim.Region.Framework.Scenes
2552 if (vialogin) 2552 if (vialogin)
2553 EventManager.TriggerOnClientLogin(client); 2553 EventManager.TriggerOnClientLogin(client);
2554 2554
2555 // Send all scene object to the new client 2555 return sp;
2556 Util.FireAndForget(delegate
2557 {
2558 EntityBase[] entities = Entities.GetEntities();
2559 foreach(EntityBase e in entities)
2560 {
2561 if (e != null && e is SceneObjectGroup)
2562 ((SceneObjectGroup)e).SendFullUpdateToClient(client);
2563 }
2564 });
2565 } 2556 }
2566 2557
2567 /// <summary> 2558 /// <summary>