From d894007920744979296284e78cb42d504037abc3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 05:46:31 +0100 Subject: [PATCH] Make it work --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7f308da5f0..bb9a7487b4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2590,6 +2590,8 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance); m_eventManager.TriggerOnNewPresence(sp); + sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags; + // HERE!!! Do the initial attachments right here // first agent upon login is a root agent by design. // All other AddNewClient calls find aCircuit.child to be true @@ -3404,6 +3406,10 @@ namespace OpenSim.Region.Framework.Scenes } else { + // Let the SP know how we got here. This has a lot of interesting + // uses down the line. + sp.TeleportFlags = (TeleportFlags)teleportFlags; + if (sp.IsChildAgent) { m_log.DebugFormat( @@ -3416,10 +3422,6 @@ namespace OpenSim.Region.Framework.Scenes } - // Let the SP know how we got here. This has a lot of interesting - // uses down the line. - sp.TeleportFlags = (TeleportFlags)teleportFlags; - // In all cases, add or update the circuit data with the new agent circuit data and teleport flags agent.teleportFlags = teleportFlags; m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent);