mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID itemID) for now
As far as I can see, this is only invoked by a PUT request to ObjectHandlers, which is not being used anyway. Invoking attachments code at this point is probably inappropriate since it would still be invoked when the client entered the scene. Being commented to simplify analysis of attachments issues. Can be uncommented when in use. Also, small tweak to lock and log removal of a SOG from the SceneObjectGroupsByLocalPartID collection in SceneGraph.GetGroupByPrim() if an inconsistency is found.
This commit is contained in:
@@ -2461,14 +2461,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns>False</returns>
|
||||
public virtual bool IncomingCreateObject(UUID userID, UUID itemID)
|
||||
{
|
||||
//m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID);
|
||||
|
||||
ScenePresence sp = GetScenePresence(userID);
|
||||
if (sp != null && AttachmentsModule != null)
|
||||
{
|
||||
uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID);
|
||||
AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt);
|
||||
}
|
||||
m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID);
|
||||
|
||||
// Commented out since this is as yet unused and is arguably not the appropriate place to do this, as
|
||||
// attachments are being rezzed elsewhere in AddNewClient()
|
||||
// ScenePresence sp = GetScenePresence(userID);
|
||||
// if (sp != null && AttachmentsModule != null)
|
||||
// {
|
||||
// uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID);
|
||||
// AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt);
|
||||
// }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -431,6 +431,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns>true if the object was deleted, false if there was no object to delete</returns>
|
||||
public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE GRAPH]: Deleting scene object with uuid {0}, resultOfObjectLinked = {1}",
|
||||
// uuid, resultOfObjectLinked);
|
||||
|
||||
EntityBase entity;
|
||||
if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
|
||||
return false;
|
||||
@@ -878,7 +882,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (Entities.TryGetValue(localID, out entity))
|
||||
return entity as SceneObjectGroup;
|
||||
|
||||
//m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID);
|
||||
// m_log.DebugFormat("[SCENE GRAPH]: Entered GetGroupByPrim with localID {0}", localID);
|
||||
|
||||
SceneObjectGroup sog;
|
||||
lock (SceneObjectGroupsByLocalPartID)
|
||||
SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog);
|
||||
@@ -886,8 +891,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (sog != null)
|
||||
{
|
||||
if (sog.HasChildPrim(localID))
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.",
|
||||
// sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
|
||||
|
||||
return sog;
|
||||
SceneObjectGroupsByLocalPartID.Remove(localID);
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (SceneObjectGroupsByLocalPartID)
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[SCENE GRAPH]: Found scene object {0} {1} {2} via SceneObjectGroupsByLocalPartID index but it doesn't contain part with local id {3}. Removing from entry from index in {4}.",
|
||||
sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
|
||||
|
||||
SceneObjectGroupsByLocalPartID.Remove(localID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EntityBase[] entityList = GetEntities();
|
||||
|
||||
Reference in New Issue
Block a user