a few more changes on link/unlink
parent
b7fca5bcac
commit
ea4a526095
|
@ -1962,19 +1962,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// slated for unlink, we need to do this
|
// slated for unlink, we need to do this
|
||||||
// Unlink the remaining set
|
// Unlink the remaining set
|
||||||
//
|
//
|
||||||
bool sendEventsToRemainder = true;
|
bool sendEventsToRemainder = false;
|
||||||
if (numChildren > 1)
|
if (numChildren == 2) // only one child prim no re-link needed
|
||||||
sendEventsToRemainder = false;
|
sendEventsToRemainder = true;
|
||||||
|
|
||||||
foreach (SceneObjectPart p in newSet)
|
foreach (SceneObjectPart p in newSet)
|
||||||
{
|
{
|
||||||
if (p != group.RootPart)
|
if (p != group.RootPart)
|
||||||
{
|
{
|
||||||
group.DelinkFromGroup(p, sendEventsToRemainder);
|
group.DelinkFromGroup(p, sendEventsToRemainder);
|
||||||
if (numChildren > 2)
|
if (sendEventsToRemainder) // finish single child prim now
|
||||||
{
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
p.ParentGroup.HasGroupChanged = true;
|
p.ParentGroup.HasGroupChanged = true;
|
||||||
p.ParentGroup.ScheduleGroupForFullUpdate();
|
p.ParentGroup.ScheduleGroupForFullUpdate();
|
||||||
|
@ -2008,8 +2005,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
newChild.ClearUpdateSchedule();
|
newChild.ClearUpdateSchedule();
|
||||||
|
|
||||||
LinkObjects(newRoot, newSet);
|
LinkObjects(newRoot, newSet);
|
||||||
if (!affectedGroups.Contains(newRoot.ParentGroup))
|
// if (!affectedGroups.Contains(newRoot.ParentGroup))
|
||||||
affectedGroups.Add(newRoot.ParentGroup);
|
// affectedGroups.Add(newRoot.ParentGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3177,9 +3177,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_scene.AddNewSceneObject(objectGroup, true);
|
m_scene.AddNewSceneObject(objectGroup, true);
|
||||||
|
|
||||||
if (sendEvents)
|
|
||||||
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
|
||||||
|
|
||||||
linkPart.Rezzed = RootPart.Rezzed;
|
linkPart.Rezzed = RootPart.Rezzed;
|
||||||
|
|
||||||
// When we delete a group, we currently have to force persist to the database if the object id has changed
|
// When we delete a group, we currently have to force persist to the database if the object id has changed
|
||||||
|
@ -3194,6 +3191,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
objectGroup.HasGroupChangedDueToDelink = true;
|
objectGroup.HasGroupChangedDueToDelink = true;
|
||||||
|
|
||||||
|
if (sendEvents)
|
||||||
|
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
return objectGroup;
|
return objectGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue