aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2011-04-18 21:04:09 +0100
committerMelanie2011-04-18 21:04:09 +0100
commitccf63a9c633606d994fe33c699f8fcd000ec9d81 (patch)
tree367d25e505b0986b78eaca8e58bc556c3dac6c92
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentFix bug where objects were being coalesced in the wrong positions. (diff)
downloadopensim-SC-ccf63a9c633606d994fe33c699f8fcd000ec9d81.zip
opensim-SC-ccf63a9c633606d994fe33c699f8fcd000ec9d81.tar.gz
opensim-SC-ccf63a9c633606d994fe33c699f8fcd000ec9d81.tar.bz2
opensim-SC-ccf63a9c633606d994fe33c699f8fcd000ec9d81.tar.xz
Merge branch 'master' into careminster-presence-refactor
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs63
-rw-r--r--bin/OpenSimDefaults.ini7
3 files changed, 56 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 8c99983..52791cb 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -75,6 +75,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
75 if (name == Name) 75 if (name == Name)
76 { 76 {
77 m_Enabled = true; 77 m_Enabled = true;
78
79 InitialiseCommon(source);
80
78 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name); 81 m_log.InfoFormat("[HG INVENTORY ACCESS MODULE]: {0} enabled.", Name);
79 82
80 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 83 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index c91c0b2..6d40e12 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -64,7 +64,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
64 return m_UserManagement; 64 return m_UserManagement;
65 } 65 }
66 } 66 }
67 67
68 public bool CoalesceMultipleObjectsToInventory { get; set; }
68 69
69 #region INonSharedRegionModule 70 #region INonSharedRegionModule
70 71
@@ -87,10 +88,28 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
87 if (name == Name) 88 if (name == Name)
88 { 89 {
89 m_Enabled = true; 90 m_Enabled = true;
90 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name); 91
92 InitialiseCommon(source);
93
94 m_log.InfoFormat("[INVENTORY ACCESS MODULE]: {0} enabled.", Name);
91 } 95 }
92 } 96 }
93 } 97 }
98
99 /// <summary>
100 /// Common module config for both this and descendant classes.
101 /// </summary>
102 /// <param name="source"></param>
103 protected virtual void InitialiseCommon(IConfigSource source)
104 {
105 IConfig inventoryConfig = source.Configs["Inventory"];
106
107 if (inventoryConfig != null)
108 CoalesceMultipleObjectsToInventory
109 = inventoryConfig.GetBoolean("CoalesceMultipleObjectsToInventory", true);
110 else
111 CoalesceMultipleObjectsToInventory = true;
112 }
94 113
95 public virtual void PostInitialise() 114 public virtual void PostInitialise()
96 { 115 {
@@ -206,20 +225,30 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
206 public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, 225 public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
207 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient) 226 List<SceneObjectGroup> objectGroups, IClientAPI remoteClient)
208 { 227 {
209 UUID ret = UUID.Zero; 228 Dictionary<UUID, List<SceneObjectGroup>> deletes = new Dictionary<UUID, List<SceneObjectGroup>>();
210 229
211 // The following code groups the SOG's by owner. No objects 230 if (CoalesceMultipleObjectsToInventory)
212 // belonging to different people can be coalesced, for obvious
213 // reasons.
214 Dictionary<UUID, List<SceneObjectGroup>> deletes =
215 new Dictionary<UUID, List<SceneObjectGroup>>();
216
217 foreach (SceneObjectGroup g in objectGroups)
218 { 231 {
219 if (!deletes.ContainsKey(g.OwnerID)) 232 // The following code groups the SOG's by owner. No objects
220 deletes[g.OwnerID] = new List<SceneObjectGroup>(); 233 // belonging to different people can be coalesced, for obvious
221 234 // reasons.
222 deletes[g.OwnerID].Add(g); 235 foreach (SceneObjectGroup g in objectGroups)
236 {
237 if (!deletes.ContainsKey(g.OwnerID))
238 deletes[g.OwnerID] = new List<SceneObjectGroup>();
239
240 deletes[g.OwnerID].Add(g);
241 }
242 }
243 else
244 {
245 // If we don't want to coalesce then put every object in its own bundle.
246 foreach (SceneObjectGroup g in objectGroups)
247 {
248 List<SceneObjectGroup> bundle = new List<SceneObjectGroup>();
249 bundle.Add(g);
250 deletes[g.UUID] = bundle;
251 }
223 } 252 }
224 253
225 // This is pethod scoped and will be returned. It will be the 254 // This is pethod scoped and will be returned. It will be the
@@ -240,9 +269,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
240 ? 250 269 ? 250
241 : objectGroup.AbsolutePosition.X) 270 : objectGroup.AbsolutePosition.X)
242 , 271 ,
243 (objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) 272 (objectGroup.AbsolutePosition.Y > (int)Constants.RegionSize)
244 ? 250 273 ? 250
245 : objectGroup.AbsolutePosition.X, 274 : objectGroup.AbsolutePosition.Y,
246 objectGroup.AbsolutePosition.Z); 275 objectGroup.AbsolutePosition.Z);
247 276
248 Vector3 originalPosition = objectGroup.AbsolutePosition; 277 Vector3 originalPosition = objectGroup.AbsolutePosition;
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 3c4ceb9..252ab8b 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -453,6 +453,13 @@
453 ; ForwardOfflineGroupMessages = true 453 ; ForwardOfflineGroupMessages = true
454 454
455 455
456[Inventory]
457 ; Control whether multiple objects sent to inventory should be coaleseced into a single item
458 ; There are still some issues with coalescence, including the fact that rotation is not restored
459 ; and some assets may be missing from archive files.
460 CoalesceMultipleObjectsToInventory = true
461
462
456[ODEPhysicsSettings] 463[ODEPhysicsSettings]
457 ;## 464 ;##
458 ;## World Settings 465 ;## World Settings