From e02062051d38e56ec22952e25a558039b5e54ab3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 16 Aug 2009 16:17:19 -0700 Subject: Making attachments work again. Tons of debug more. This needs more testing and a lot of cleaning. --- OpenSim/Region/Framework/Scenes/Scene.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 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 33166df..f475c64 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2042,13 +2042,22 @@ namespace OpenSim.Region.Framework.Scenes } else { + AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); + m_log.DebugFormat( - "[SCENE]: Adding new child agent for {0} in {1}", - client.Name, RegionInfo.RegionName); + "[SCENE]: Adding new {0} agent for {1} in {2}", + ((aCircuit.child == true) ? "child" : "root"), client.Name, RegionInfo.RegionName); CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); - CreateAndAddScenePresence(client); + ScenePresence sp = CreateAndAddScenePresence(client); + + // HERE!!! Do the initial attachments here + if (aCircuit.child == false) // first agent upon login is root agent + { + sp.IsChildAgent = false; + sp.RezAttachments(); + } } m_LastLogin = Environment.TickCount; -- cgit v1.1