Merge commit 'c2093ccce16cd5210c8e0759f23b5b4bd205b7af' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/ScenePresence.csavinationmerge
commit
120903efb6
|
@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0}", sp.Name);
|
// m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name);
|
||||||
|
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
string stateData = String.Empty;
|
string stateData = String.Empty;
|
||||||
|
|
|
@ -2978,35 +2978,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_eventManager.TriggerOnNewPresence(sp);
|
m_eventManager.TriggerOnNewPresence(sp);
|
||||||
|
|
||||||
sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
|
sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
|
||||||
|
|
||||||
// The first agent upon login is a root agent by design.
|
|
||||||
// For this agent we will have to rez the attachments.
|
|
||||||
// All other AddNewClient calls find aCircuit.child to be true.
|
|
||||||
if (aCircuit.child == false)
|
|
||||||
{
|
|
||||||
// We have to set SP to be a root agent here so that SP.MakeRootAgent() will later not try to
|
|
||||||
// start the scripts again (since this is done in RezAttachments()).
|
|
||||||
// XXX: This is convoluted.
|
|
||||||
sp.IsChildAgent = false;
|
|
||||||
sp.IsLoggingIn = true;
|
|
||||||
|
|
||||||
// We leave a 5 second pause before attempting to rez attachments to avoid a clash with
|
|
||||||
// version 3 viewers that maybe doing their own attachment rezzing related to their current
|
|
||||||
// outfit folder on startup. If these operations do clash, then the symptoms are invisible
|
|
||||||
// attachments until one zooms in on the avatar.
|
|
||||||
//
|
|
||||||
// We do not pause if we are launching on the same thread anyway in order to avoid pointlessly
|
|
||||||
// delaying any attachment related regression tests.
|
|
||||||
if (AttachmentsModule != null)
|
|
||||||
Util.FireAndForget(
|
|
||||||
o =>
|
|
||||||
{
|
|
||||||
if (Util.FireAndForgetMethod != FireAndForgetMethod.None)
|
|
||||||
Thread.Sleep(5000);
|
|
||||||
|
|
||||||
AttachmentsModule.RezAttachments(sp);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -941,8 +941,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
"[SCENE]: Upgrading child to root agent for {0} in {1}",
|
"[SCENE]: Upgrading child to root agent for {0} in {1}",
|
||||||
Name, m_scene.RegionInfo.RegionName);
|
Name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
bool wasChild = IsChildAgent;
|
|
||||||
|
|
||||||
if (ParentUUID != UUID.Zero)
|
if (ParentUUID != UUID.Zero)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID);
|
m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID);
|
||||||
|
@ -975,6 +973,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
IsLoggingIn = false;
|
IsLoggingIn = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
|
||||||
|
|
||||||
|
IsChildAgent = false;
|
||||||
|
|
||||||
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
|
||||||
if (gm != null)
|
if (gm != null)
|
||||||
|
@ -1095,22 +1096,44 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// and it has already rezzed the attachments and started their scripts.
|
// and it has already rezzed the attachments and started their scripts.
|
||||||
// We do the following only for non-login agents, because their scripts
|
// We do the following only for non-login agents, because their scripts
|
||||||
// haven't started yet.
|
// haven't started yet.
|
||||||
lock (m_attachments)
|
if ((TeleportFlags & TeleportFlags.ViaLogin) != 0)
|
||||||
{
|
{
|
||||||
if (wasChild && HasAttachments())
|
// We leave a 5 second pause before attempting to rez attachments to avoid a clash with
|
||||||
{
|
// version 3 viewers that maybe doing their own attachment rezzing related to their current
|
||||||
m_log.DebugFormat(
|
// outfit folder on startup. If these operations do clash, then the symptoms are invisible
|
||||||
"[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
|
// attachments until one zooms in on the avatar.
|
||||||
|
//
|
||||||
// Resume scripts
|
// We do not pause if we are launching on the same thread anyway in order to avoid pointlessly
|
||||||
Util.FireAndForget(delegate(object x) {
|
// delaying any attachment related regression tests.
|
||||||
foreach (SceneObjectGroup sog in m_attachments)
|
if (Scene.AttachmentsModule != null)
|
||||||
|
Util.FireAndForget(
|
||||||
|
o =>
|
||||||
{
|
{
|
||||||
sog.ScheduleGroupForFullUpdate();
|
if (Util.FireAndForgetMethod != FireAndForgetMethod.None)
|
||||||
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
System.Threading.Thread.Sleep(5000);
|
||||||
sog.ResumeScripts();
|
|
||||||
}
|
Scene.AttachmentsModule.RezAttachments(this);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lock (m_attachments)
|
||||||
|
{
|
||||||
|
if (HasAttachments())
|
||||||
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
|
||||||
|
|
||||||
|
// Resume scripts
|
||||||
|
Util.FireAndForget(delegate(object x) {
|
||||||
|
foreach (SceneObjectGroup sog in m_attachments)
|
||||||
|
{
|
||||||
|
sog.ScheduleGroupForFullUpdate();
|
||||||
|
sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
|
||||||
|
sog.ResumeScripts();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue