Guard against multiple calls to SetOwnerId on one logical ownership change.

LSLKeyTest
Diva Canto 2016-06-20 16:02:37 -07:00
parent bc0fc16f44
commit 34b308d5b6
1 changed files with 6 additions and 4 deletions

View File

@ -2123,11 +2123,13 @@ namespace OpenSim.Region.Framework.Scenes
public void SetOwnerId(UUID userId)
{
ForEachPart(delegate(SceneObjectPart part)
ForEachPart(delegate(SceneObjectPart part)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = userId;
if (OwnerID != userId)
{
part.LastOwnerID = part.OwnerID;
part.OwnerID = userId;
}
});
}