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.

dsg
Dan Lake 2011-01-30 04:27:59 -08:00
parent a23ffa2262
commit e709b55f01
1 changed files with 5 additions and 31 deletions

View File

@ -3039,45 +3039,19 @@ 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)
{
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
// REGION SYNC (Circuit might be null)
if (aCircuit == null || (aCircuit != null && aCircuit.child == false))
{
sp.IsChildAgent = false;
Util.FireAndForget(delegate(object o) { sp.RezAttachments(); });
}
}
}
if (GetScenePresence(client.AgentId) != null)
{