aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-28 23:31:23 +0100
committerJustin Clark-Casey (justincc)2012-06-28 23:31:23 +0100
commitbfa6896678872a4e796ec4de22e83b6cead3ba17 (patch)
tree38c266a595d458f4783105ce8157c0dfc3c556ca /OpenSim/Region/CoreModules/Avatar/Attachments/Tests
parentRather than iterating through all SOGs in the scene looking for the one that ... (diff)
downloadopensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.zip
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.gz
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.bz2
opensim-SC_OLD-bfa6896678872a4e796ec4de22e83b6cead3ba17.tar.xz
Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a SOG directly instead of an item ID to then shuffle through attachments, saving CPU busywork.
Almost all callers already had the sog to hand. Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/Tests')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 65722fe..b0c087f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -227,9 +227,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
227 227
228 InventoryItemBase attItem = CreateAttachmentItem(scene, ua1.PrincipalID, "att", 0x10, 0x20); 228 InventoryItemBase attItem = CreateAttachmentItem(scene, ua1.PrincipalID, "att", 0x10, 0x20);
229 229
230 scene.AttachmentsModule.RezSingleAttachmentFromInventory( 230 SceneObjectGroup so
231 sp, attItem.ID, (uint)AttachmentPoint.Chest); 231 = (SceneObjectGroup)scene.AttachmentsModule.RezSingleAttachmentFromInventory(
232 scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, attItem.ID); 232 sp, attItem.ID, (uint)AttachmentPoint.Chest);
233 scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, so);
233 234
234 // Check status on scene presence 235 // Check status on scene presence
235 Assert.That(sp.HasAttachments(), Is.False); 236 Assert.That(sp.HasAttachments(), Is.False);