sog DelinkFromGroup: change order of some operations
parent
60a924f3c6
commit
c887446b7e
|
@ -103,6 +103,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Array.ForEach<SceneObjectPart>(m_parts.GetArray(), p => p.Inventory.StopScriptInstances());
|
Array.ForEach<SceneObjectPart>(m_parts.GetArray(), p => p.Inventory.StopScriptInstances());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendReleaseScriptsControl()
|
||||||
|
{
|
||||||
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
|
for (int i = 0; i < parts.Length; i++)
|
||||||
|
parts[i].Inventory.SendReleaseScriptsControl();
|
||||||
|
}
|
||||||
|
|
||||||
public void RemoveScriptsPermissions(int permissions)
|
public void RemoveScriptsPermissions(int permissions)
|
||||||
{
|
{
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
|
|
|
@ -3414,13 +3414,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
linkPart.setGroupPosition(worldPos);
|
linkPart.setGroupPosition(worldPos);
|
||||||
linkPart.setOffsetPosition(Vector3.Zero);
|
linkPart.setOffsetPosition(Vector3.Zero);
|
||||||
linkPart.setRotationOffset(worldRot);
|
linkPart.setRotationOffset(worldRot);
|
||||||
|
linkPart.Rezzed = RootPart.Rezzed;
|
||||||
|
|
||||||
// Create a new SOG to go around this unlinked and unattached SOP
|
// Create a new SOG to go around this unlinked and unattached SOP
|
||||||
SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
|
SceneObjectGroup objectGroup = new SceneObjectGroup(linkPart);
|
||||||
|
InvalidBoundsRadius();
|
||||||
|
InvalidatePartsLinkMaps();
|
||||||
|
objectGroup.InvalidateEffectivePerms();
|
||||||
|
|
||||||
m_scene.AddNewSceneObject(objectGroup, true);
|
objectGroup.HasGroupChangedDueToDelink = true;
|
||||||
|
|
||||||
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
|
||||||
// (since delete works by deleting all rows which have a given object id)
|
// (since delete works by deleting all rows which have a given object id)
|
||||||
|
@ -3429,15 +3431,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (linkPart.PhysicsShapeType == (byte)PhysShapeType.none)
|
if (linkPart.PhysicsShapeType == (byte)PhysShapeType.none)
|
||||||
linkPart.PhysicsShapeType = linkPart.DefaultPhysicsShapeType(); // root prims can't have type none for now
|
linkPart.PhysicsShapeType = linkPart.DefaultPhysicsShapeType(); // root prims can't have type none for now
|
||||||
|
|
||||||
|
m_scene.AddNewSceneObject(objectGroup, true);
|
||||||
|
|
||||||
if (m_rootPart.PhysActor != null)
|
if (m_rootPart.PhysActor != null)
|
||||||
m_rootPart.PhysActor.Building = false;
|
m_rootPart.PhysActor.Building = false;
|
||||||
|
|
||||||
objectGroup.HasGroupChangedDueToDelink = true;
|
|
||||||
|
|
||||||
InvalidBoundsRadius();
|
|
||||||
InvalidatePartsLinkMaps();
|
|
||||||
objectGroup.InvalidateEffectivePerms();
|
|
||||||
|
|
||||||
if (sendEvents)
|
if (sendEvents)
|
||||||
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
linkPart.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue