aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-13 21:31:45 +0100
committerJustin Clark-Casey (justincc)2011-04-13 21:31:45 +0100
commitd8d28c37372718aa593ead5c85cd45ced83766a5 (patch)
tree15203169c5da41cd91692152563743aeb7d152bc
parentAdd coalesced scene objects class and serializer. This is currently only use... (diff)
downloadopensim-SC_OLD-d8d28c37372718aa593ead5c85cd45ced83766a5.zip
opensim-SC_OLD-d8d28c37372718aa593ead5c85cd45ced83766a5.tar.gz
opensim-SC_OLD-d8d28c37372718aa593ead5c85cd45ced83766a5.tar.bz2
opensim-SC_OLD-d8d28c37372718aa593ead5c85cd45ced83766a5.tar.xz
Fix bug where rezzing coalesced objects would give all objects the same name as the item.
This now only happens for the first object (which was the item selected last when the coalesce was originally taken) This matches the expected behaviour of the environment as seen on the Linden Labs grid.
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs13
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs5
2 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index cfcfc79..1f8bad1 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -762,10 +762,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
762 // affect the name stored in the serialization, transfer 762 // affect the name stored in the serialization, transfer
763 // the correct name from the inventory to the 763 // the correct name from the inventory to the
764 // object itself before we rez. 764 // object itself before we rez.
765 rootPart.Name = item.Name; 765 //
766 rootPart.Description = item.Description; 766 // Only do these for the first object if we are rezzing a coalescence.
767 rootPart.ObjectSaleType = item.SaleType; 767 if (i == 0)
768 rootPart.SalePrice = item.SalePrice; 768 {
769 rootPart.Name = item.Name;
770 rootPart.Description = item.Description;
771 rootPart.ObjectSaleType = item.SaleType;
772 rootPart.SalePrice = item.SalePrice;
773 }
769 774
770 group.SetGroup(remoteClient.ActiveGroupId, remoteClient); 775 group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
771 if ((rootPart.OwnerID != item.Owner) || 776 if ((rootPart.OwnerID != item.Owner) ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index f8fa424..0f2b610 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -154,9 +154,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
154 Assert.That(retrievedObj1Part, Is.Not.Null); 154 Assert.That(retrievedObj1Part, Is.Not.Null);
155 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); 155 Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name));
156 156
157 // FIXME: Can't test yet due to a bug where objects in coalescence all get the item name when rerezzed. 157 SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name);
158// SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); 158 Assert.That(retrievedObj2Part, Is.Not.Null);
159// Assert.That(retrievedObj2Part, Is.Not.Null);
160 } 159 }
161 160
162 [Test] 161 [Test]