Set group on newly rezzed objects to the rezzer's (or rezzing object's)

group
0.6.1-post-fixes
Melanie Thielker 2008-11-17 21:44:09 +00:00
parent 93b18d7323
commit a8e40bed52
4 changed files with 28 additions and 1 deletions

View File

@ -2031,6 +2031,7 @@ namespace OpenSim.Region.Environment.Scenes
List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values);
group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
if (rootPart.OwnerID != item.Owner)
{
//Need to kill the for sale here
@ -2148,6 +2149,8 @@ namespace OpenSim.Region.Environment.Scenes
List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values);
group.SetGroup(sourcePart.GroupID, null);
if (rootPart.OwnerID != item.OwnerID)
{
if (ExternalChecks.ExternalChecksPropagatePermissions())

View File

@ -2825,6 +2825,7 @@ namespace OpenSim.Region.Environment.Scenes
foreach (SceneObjectPart part in m_parts.Values)
{
part.SetGroup(GroupID, client);
part.ChangeInventoryGroup(GroupID);
}
HasGroupChanged = true;

View File

@ -123,6 +123,28 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void ChangeInventoryGroup(UUID groupID)
{
lock (TaskInventory)
{
if (0 == TaskInventory.Count)
{
return;
}
HasInventoryChanged = true;
ParentGroup.HasGroupChanged = true;
IList<TaskInventoryItem> items = new List<TaskInventoryItem>(TaskInventory.Values);
foreach (TaskInventoryItem item in items)
{
if (groupID != item.GroupID)
{
item.GroupID = groupID;
}
}
}
}
/// <summary>
/// Start all the scripts contained in this prim's inventory
/// </summary>

View File

@ -2304,7 +2304,8 @@ if (m_shape != null) {
public void SetGroup(UUID groupID, IClientAPI client)
{
_groupID = groupID;
GetProperties(client);
if (client != null)
GetProperties(client);
m_updateFlag = 2;
}