Comment out Scene.CleanDroppedAttachments() and calls.
This method wasn't actually doing anything since dropped attachments retain a PCode of 9. Also, behaviour of dropped attachments in other places appears to be that they persist after avatar logout rather than get deleted.remove-scene-viewer
parent
dbcfb25a52
commit
e6eb0d9a6f
|
@ -493,7 +493,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
// Now let's make it officially a child agent
|
// Now let's make it officially a child agent
|
||||||
sp.MakeChildAgent();
|
sp.MakeChildAgent();
|
||||||
|
|
||||||
sp.Scene.CleanDroppedAttachments();
|
// sp.Scene.CleanDroppedAttachments();
|
||||||
|
|
||||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
||||||
|
|
||||||
|
|
|
@ -3182,7 +3182,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
|
m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
|
||||||
CleanDroppedAttachments();
|
// CleanDroppedAttachments();
|
||||||
//m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
|
//m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));
|
||||||
//m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
|
//m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
|
||||||
}
|
}
|
||||||
|
@ -3406,7 +3406,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (vialogin)
|
if (vialogin)
|
||||||
{
|
{
|
||||||
CleanDroppedAttachments();
|
// CleanDroppedAttachments();
|
||||||
|
|
||||||
if (TestBorderCross(agent.startpos, Cardinals.E))
|
if (TestBorderCross(agent.startpos, Cardinals.E))
|
||||||
{
|
{
|
||||||
|
@ -5123,40 +5123,40 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CleanDroppedAttachments()
|
// public void CleanDroppedAttachments()
|
||||||
{
|
// {
|
||||||
List<SceneObjectGroup> objectsToDelete =
|
// List<SceneObjectGroup> objectsToDelete =
|
||||||
new List<SceneObjectGroup>();
|
// new List<SceneObjectGroup>();
|
||||||
|
//
|
||||||
lock (m_cleaningAttachments)
|
// lock (m_cleaningAttachments)
|
||||||
{
|
// {
|
||||||
ForEachSOG(delegate (SceneObjectGroup grp)
|
// ForEachSOG(delegate (SceneObjectGroup grp)
|
||||||
{
|
// {
|
||||||
if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp)))
|
// if (grp.RootPart.Shape.PCode == 0 && grp.RootPart.Shape.State != 0 && (!objectsToDelete.Contains(grp)))
|
||||||
{
|
// {
|
||||||
UUID agentID = grp.OwnerID;
|
// UUID agentID = grp.OwnerID;
|
||||||
if (agentID == UUID.Zero)
|
// if (agentID == UUID.Zero)
|
||||||
{
|
// {
|
||||||
objectsToDelete.Add(grp);
|
// objectsToDelete.Add(grp);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
ScenePresence sp = GetScenePresence(agentID);
|
// ScenePresence sp = GetScenePresence(agentID);
|
||||||
if (sp == null)
|
// if (sp == null)
|
||||||
{
|
// {
|
||||||
objectsToDelete.Add(grp);
|
// objectsToDelete.Add(grp);
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
foreach (SceneObjectGroup grp in objectsToDelete)
|
// foreach (SceneObjectGroup grp in objectsToDelete)
|
||||||
{
|
// {
|
||||||
m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID);
|
// m_log.InfoFormat("[SCENE]: Deleting dropped attachment {0} of user {1}", grp.UUID, grp.OwnerID);
|
||||||
DeleteSceneObject(grp, true);
|
// DeleteSceneObject(grp, true);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// This method is called across the simulation connector to
|
// This method is called across the simulation connector to
|
||||||
// determine if a given agent is allowed in this region
|
// determine if a given agent is allowed in this region
|
||||||
|
|
Loading…
Reference in New Issue