diff options
author | John Hurliman | 2010-09-16 17:30:46 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-16 17:30:46 -0700 |
commit | 860b2a502f797e5822c6705d4639f370f3ac5861 (patch) | |
tree | 5a74ddbd626142e27f6c3439ea267b8ea348ce9c /OpenSim/Region/CoreModules | |
parent | Add the modules include line back that i dropped by mistake (diff) | |
download | opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.zip opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.gz opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.bz2 opensim-SC_OLD-860b2a502f797e5822c6705d4639f370f3ac5861.tar.xz |
Changed SceneObjectGroup to store parts with the fast and thread-safe MapAndArray collection
Diffstat (limited to 'OpenSim/Region/CoreModules')
5 files changed, 8 insertions, 29 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 1ebac42..cb39e46 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -567,13 +567,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
567 | so.RootPart.AttachedAvatar = avatar.UUID; | 567 | so.RootPart.AttachedAvatar = avatar.UUID; |
568 | 568 | ||
569 | //Anakin Lohner bug #3839 | 569 | //Anakin Lohner bug #3839 |
570 | lock (so.Children) | 570 | SceneObjectPart[] parts = so.Parts; |
571 | { | 571 | for (int i = 0; i < parts.Length; i++) |
572 | foreach (SceneObjectPart p in so.Children.Values) | 572 | parts[i].AttachedAvatar = avatar.UUID; |
573 | { | ||
574 | p.AttachedAvatar = avatar.UUID; | ||
575 | } | ||
576 | } | ||
577 | 573 | ||
578 | if (so.RootPart.PhysActor != null) | 574 | if (so.RootPart.PhysActor != null) |
579 | { | 575 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 4c4eeff..c1d6cd3 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -594,10 +594,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
594 | rootPart.Name = item.Name; | 594 | rootPart.Name = item.Name; |
595 | rootPart.Description = item.Description; | 595 | rootPart.Description = item.Description; |
596 | 596 | ||
597 | List<SceneObjectPart> partList = null; | ||
598 | lock (group.Children) | ||
599 | partList = new List<SceneObjectPart>(group.Children.Values); | ||
600 | |||
601 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); | 597 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); |
602 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 598 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) |
603 | { | 599 | { |
@@ -607,7 +603,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
607 | 603 | ||
608 | if (m_Scene.Permissions.PropagatePermissions()) | 604 | if (m_Scene.Permissions.PropagatePermissions()) |
609 | { | 605 | { |
610 | foreach (SceneObjectPart part in partList) | 606 | foreach (SceneObjectPart part in group.Parts) |
611 | { | 607 | { |
612 | part.EveryoneMask = item.EveryOnePermissions; | 608 | part.EveryoneMask = item.EveryOnePermissions; |
613 | part.NextOwnerMask = item.NextPermissions; | 609 | part.NextOwnerMask = item.NextPermissions; |
@@ -618,7 +614,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
618 | } | 614 | } |
619 | } | 615 | } |
620 | 616 | ||
621 | foreach (SceneObjectPart part in partList) | 617 | foreach (SceneObjectPart part in group.Parts) |
622 | { | 618 | { |
623 | if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 619 | if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) |
624 | { | 620 | { |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 1fba6c2..6b538f6 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -243,11 +243,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
243 | // to the same scene (when this is possible). | 243 | // to the same scene (when this is possible). |
244 | sceneObject.ResetIDs(); | 244 | sceneObject.ResetIDs(); |
245 | 245 | ||
246 | List<SceneObjectPart> partList = null; | 246 | foreach (SceneObjectPart part in sceneObject.Parts) |
247 | lock (sceneObject.Children) | ||
248 | partList = new List<SceneObjectPart>(sceneObject.Children.Values); | ||
249 | |||
250 | foreach (SceneObjectPart part in partList) | ||
251 | { | 247 | { |
252 | if (!ResolveUserUuid(part.CreatorID)) | 248 | if (!ResolveUserUuid(part.CreatorID)) |
253 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 249 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index db50339..d91c36c 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -128,14 +128,9 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
128 | group.SetOwnerId(remoteClient.AgentId); | 128 | group.SetOwnerId(remoteClient.AgentId); |
129 | group.SetRootPartOwner(part, remoteClient.AgentId, remoteClient.ActiveGroupId); | 129 | group.SetRootPartOwner(part, remoteClient.AgentId, remoteClient.ActiveGroupId); |
130 | 130 | ||
131 | List<SceneObjectPart> partList = null; | ||
132 | |||
133 | lock (group.Children) | ||
134 | partList = new List<SceneObjectPart>(group.Children.Values); | ||
135 | |||
136 | if (m_scene.Permissions.PropagatePermissions()) | 131 | if (m_scene.Permissions.PropagatePermissions()) |
137 | { | 132 | { |
138 | foreach (SceneObjectPart child in partList) | 133 | foreach (SceneObjectPart child in group.Parts) |
139 | { | 134 | { |
140 | child.Inventory.ChangeInventoryOwner(remoteClient.AgentId); | 135 | child.Inventory.ChangeInventoryOwner(remoteClient.AgentId); |
141 | child.TriggerScriptChangedEvent(Changed.OWNER); | 136 | child.TriggerScriptChangedEvent(Changed.OWNER); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 1bd1371..c83ac85 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -229,11 +229,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
229 | Color mapdotspot = Color.Gray; // Default color when prim color is white | 229 | Color mapdotspot = Color.Gray; // Default color when prim color is white |
230 | 230 | ||
231 | // Loop over prim in group | 231 | // Loop over prim in group |
232 | List<SceneObjectPart> partList = null; | 232 | foreach (SceneObjectPart part in mapdot.Parts) |
233 | lock (mapdot.Children) | ||
234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); | ||
235 | |||
236 | foreach (SceneObjectPart part in partList) | ||
237 | { | 233 | { |
238 | if (part == null) | 234 | if (part == null) |
239 | continue; | 235 | continue; |