Try disabling the inconsistent attachment state check to see if this actually has an impact.
The code in question is over three years old and just be catching an inconsistency rather than being wholly necessary. This commit still carries out the check and prints all the previous log warnings but a 'failure' no longer prevents avatar region crossing or teleport, and it doesn't give the client the error message. This will have some kind of impact on http://opensimulator.org/mantis/view.php?id=5672remove-scene-viewer
parent
5e579b71fd
commit
cf73afec35
|
@ -209,8 +209,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
sp.Teleport(position);
|
sp.Teleport(position);
|
||||||
|
|
||||||
foreach (SceneObjectGroup grp in sp.GetAttachments())
|
foreach (SceneObjectGroup grp in sp.GetAttachments())
|
||||||
|
{
|
||||||
|
if (grp.IsDeleted)
|
||||||
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // Another region possibly in another simulator
|
else // Another region possibly in another simulator
|
||||||
{
|
{
|
||||||
uint x = 0, y = 0;
|
uint x = 0, y = 0;
|
||||||
|
@ -326,11 +329,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if (sp.ParentID != (uint)0)
|
if (sp.ParentID != (uint)0)
|
||||||
sp.StandUp();
|
sp.StandUp();
|
||||||
|
|
||||||
if (!sp.ValidateAttachments())
|
// if (!sp.ValidateAttachments())
|
||||||
{
|
// {
|
||||||
sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
|
// sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
string version;
|
string version;
|
||||||
|
@ -944,8 +947,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
Scene m_scene = agent.Scene;
|
Scene m_scene = agent.Scene;
|
||||||
|
|
||||||
if (neighbourRegion != null && agent.ValidateAttachments())
|
if (neighbourRegion != null)
|
||||||
{
|
{
|
||||||
|
agent.ValidateAttachments();
|
||||||
|
|
||||||
pos = pos + (agent.Velocity);
|
pos = pos + (agent.Velocity);
|
||||||
|
|
||||||
SetInTransit(agent.UUID);
|
SetInTransit(agent.UUID);
|
||||||
|
@ -1763,16 +1768,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
List<SceneObjectGroup> m_attachments = sp.GetAttachments();
|
List<SceneObjectGroup> m_attachments = sp.GetAttachments();
|
||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
foreach (SceneObjectGroup gobj in m_attachments)
|
// foreach (SceneObjectGroup gobj in m_attachments)
|
||||||
{
|
// {
|
||||||
if (gobj == null || gobj.IsDeleted)
|
// if (gobj == null || gobj.IsDeleted)
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
foreach (SceneObjectGroup gobj in m_attachments)
|
foreach (SceneObjectGroup gobj in m_attachments)
|
||||||
{
|
{
|
||||||
// If the prim group is null then something must have happened to it!
|
// If the prim group is null then something must have happened to it!
|
||||||
if (gobj != null)
|
if (gobj != null && !gobj.IsDeleted)
|
||||||
{
|
{
|
||||||
// Set the parent localID to 0 so it transfers over properly.
|
// Set the parent localID to 0 so it transfers over properly.
|
||||||
gobj.RootPart.SetParentLocalId(0);
|
gobj.RootPart.SetParentLocalId(0);
|
||||||
|
|
|
@ -323,6 +323,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||||
List<UUID> targets = new List<UUID>();
|
List<UUID> targets = new List<UUID>();
|
||||||
foreach (SceneObjectGroup sog in attachments)
|
foreach (SceneObjectGroup sog in attachments)
|
||||||
{
|
{
|
||||||
|
if (!sog.IsDeleted)
|
||||||
targets.Add(sog.UUID);
|
targets.Add(sog.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3498,7 +3498,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_attachments.Clear();
|
m_attachments.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ValidateAttachments()
|
/// <summary>
|
||||||
|
/// This is currently just being done for information.
|
||||||
|
/// </summary>
|
||||||
|
public void ValidateAttachments()
|
||||||
{
|
{
|
||||||
lock (m_attachments)
|
lock (m_attachments)
|
||||||
{
|
{
|
||||||
|
@ -3508,21 +3511,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (gobj == null)
|
if (gobj == null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null", Name);
|
"[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null. Continuing", Name);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
else if (gobj.IsDeleted)
|
||||||
if (gobj.IsDeleted)
|
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted",
|
"[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted. Continuing",
|
||||||
gobj.Name, gobj.UUID, Name);
|
gobj.Name, gobj.UUID, Name);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue