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.
bulletsim
Justin Clark-Casey (justincc) 2011-04-13 21:31:45 +01:00
parent 58efd761d1
commit d8d28c3737
2 changed files with 11 additions and 7 deletions

View File

@ -762,10 +762,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// affect the name stored in the serialization, transfer // affect the name stored in the serialization, transfer
// the correct name from the inventory to the // the correct name from the inventory to the
// object itself before we rez. // object itself before we rez.
//
// Only do these for the first object if we are rezzing a coalescence.
if (i == 0)
{
rootPart.Name = item.Name; rootPart.Name = item.Name;
rootPart.Description = item.Description; rootPart.Description = item.Description;
rootPart.ObjectSaleType = item.SaleType; rootPart.ObjectSaleType = item.SaleType;
rootPart.SalePrice = item.SalePrice; rootPart.SalePrice = item.SalePrice;
}
group.SetGroup(remoteClient.ActiveGroupId, remoteClient); group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
if ((rootPart.OwnerID != item.Owner) || if ((rootPart.OwnerID != item.Owner) ||

View File

@ -154,9 +154,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
Assert.That(retrievedObj1Part, Is.Not.Null); Assert.That(retrievedObj1Part, Is.Not.Null);
Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name)); Assert.That(retrievedObj1Part.Name, Is.EqualTo(item1.Name));
// FIXME: Can't test yet due to a bug where objects in coalescence all get the item name when rerezzed. SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name);
// SceneObjectPart retrievedObj2Part = m_scene.GetSceneObjectPart(object2.Name); Assert.That(retrievedObj2Part, Is.Not.Null);
// Assert.That(retrievedObj2Part, Is.Not.Null);
} }
[Test] [Test]