diff options
author | Justin Clark-Casey (justincc) | 2011-09-13 20:25:32 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-13 20:25:32 +0100 |
commit | 618277e797c7d501f98e884e50abd313498cf00b (patch) | |
tree | 7854d60ddb9d0ac5957194f274a41b44cfd636d7 /OpenSim/Region/Framework/Scenes | |
parent | stop the duplicate remove of the root part ids from the full part and local p... (diff) | |
download | opensim-SC_OLD-618277e797c7d501f98e884e50abd313498cf00b.zip opensim-SC_OLD-618277e797c7d501f98e884e50abd313498cf00b.tar.gz opensim-SC_OLD-618277e797c7d501f98e884e50abd313498cf00b.tar.bz2 opensim-SC_OLD-618277e797c7d501f98e884e50abd313498cf00b.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 25 |
2 files changed, 33 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a0a2624..c5c9260 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2461,14 +2461,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2461 | /// <returns>False</returns> | 2461 | /// <returns>False</returns> |
2462 | public virtual bool IncomingCreateObject(UUID userID, UUID itemID) | 2462 | public virtual bool IncomingCreateObject(UUID userID, UUID itemID) |
2463 | { | 2463 | { |
2464 | //m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID); | 2464 | m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID); |
2465 | 2465 | ||
2466 | ScenePresence sp = GetScenePresence(userID); | 2466 | // Commented out since this is as yet unused and is arguably not the appropriate place to do this, as |
2467 | if (sp != null && AttachmentsModule != null) | 2467 | // attachments are being rezzed elsewhere in AddNewClient() |
2468 | { | 2468 | // ScenePresence sp = GetScenePresence(userID); |
2469 | uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); | 2469 | // if (sp != null && AttachmentsModule != null) |
2470 | AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); | 2470 | // { |
2471 | } | 2471 | // uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); |
2472 | // AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); | ||
2473 | // } | ||
2472 | 2474 | ||
2473 | return false; | 2475 | return false; |
2474 | } | 2476 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 46c22ca..f03cf7b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -431,6 +431,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
431 | /// <returns>true if the object was deleted, false if there was no object to delete</returns> | 431 | /// <returns>true if the object was deleted, false if there was no object to delete</returns> |
432 | public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) | 432 | public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) |
433 | { | 433 | { |
434 | // m_log.DebugFormat( | ||
435 | // "[SCENE GRAPH]: Deleting scene object with uuid {0}, resultOfObjectLinked = {1}", | ||
436 | // uuid, resultOfObjectLinked); | ||
437 | |||
434 | EntityBase entity; | 438 | EntityBase entity; |
435 | if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup))) | 439 | if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup))) |
436 | return false; | 440 | return false; |
@@ -878,7 +882,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
878 | if (Entities.TryGetValue(localID, out entity)) | 882 | if (Entities.TryGetValue(localID, out entity)) |
879 | return entity as SceneObjectGroup; | 883 | return entity as SceneObjectGroup; |
880 | 884 | ||
881 | //m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID); | 885 | // m_log.DebugFormat("[SCENE GRAPH]: Entered GetGroupByPrim with localID {0}", localID); |
886 | |||
882 | SceneObjectGroup sog; | 887 | SceneObjectGroup sog; |
883 | lock (SceneObjectGroupsByLocalPartID) | 888 | lock (SceneObjectGroupsByLocalPartID) |
884 | SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog); | 889 | SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog); |
@@ -886,8 +891,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
886 | if (sog != null) | 891 | if (sog != null) |
887 | { | 892 | { |
888 | if (sog.HasChildPrim(localID)) | 893 | if (sog.HasChildPrim(localID)) |
894 | { | ||
895 | // m_log.DebugFormat( | ||
896 | // "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.", | ||
897 | // sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName); | ||
898 | |||
889 | return sog; | 899 | return sog; |
890 | SceneObjectGroupsByLocalPartID.Remove(localID); | 900 | } |
901 | else | ||
902 | { | ||
903 | lock (SceneObjectGroupsByLocalPartID) | ||
904 | { | ||
905 | m_log.WarnFormat( | ||
906 | "[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}.", | ||
907 | sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName); | ||
908 | |||
909 | SceneObjectGroupsByLocalPartID.Remove(localID); | ||
910 | } | ||
911 | } | ||
891 | } | 912 | } |
892 | 913 | ||
893 | EntityBase[] entityList = GetEntities(); | 914 | EntityBase[] entityList = GetEntities(); |