From e709b55f01f4f24c2ab91f6ea3eb1734f54c24f1 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Sun, 30 Jan 2011 04:27:59 -0800 Subject: [PATCH] Fixed compilation errors due to merge conflicts. AddNewAgent2 has been greatly reduced in complexity. We need to validate that it's going to do the right thing for the REGION SYNC cases. --- OpenSim/Region/Framework/Scenes/Scene.cs | 36 ++++-------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d78c356415..92a91bcf9d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3039,43 +3039,17 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance); m_eventManager.TriggerOnNewPresence(sp); - // REGION SYNC - // The owner is not being set properly when there is no circuit. Hmmm - // Commenting this out for the merge from master. Might still need it since we have no circuit on scene - // presence.Appearance.Owner = presence.UUID; - - presence.initializeScenePresence(client, RegionInfo, this); + //presence.initializeScenePresence(client, RegionInfo, this); 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 - if (aCircuit.child == false) + // REGION SYNC (Circuit might be null) + if (aCircuit == null || (aCircuit != null && aCircuit.child == false)) { - Monitor.PulseAll(m_restorePresences); - } - } - else - { - if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here - { - m_log.DebugFormat("[SCENE ({0})]: Adding new agent {1} ({2}) to scene.", m_regionName, client.Name, client.AgentId); - - m_clientManager.Add(client); - SubscribeToClientEvents(client); - - ScenePresence sp = CreateAndAddScenePresence(client); - if (aCircuit != null) - sp.Appearance = aCircuit.Appearance; - - // 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 - if (aCircuit == null || (aCircuit != null && aCircuit.child == false)) - { - sp.IsChildAgent = false; - Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); - } + sp.IsChildAgent = false; + Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); } }