diff options
Diffstat (limited to 'OpenSim/Region/Framework')
4 files changed, 18 insertions, 40 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9a33993..8b5316a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1688,37 +1688,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1688 | } | 1688 | } |
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | /// <summary> | ||
1692 | /// Called when one or more objects are removed from the environment into inventory. | ||
1693 | /// </summary> | ||
1694 | /// <param name="remoteClient"></param> | ||
1695 | /// <param name="localID"></param> | ||
1696 | /// <param name="groupID"></param> | ||
1697 | /// <param name="action"></param> | ||
1698 | /// <param name="destinationID"></param> | ||
1699 | public virtual void DeRezObject(IClientAPI remoteClient, List<uint> localIDs, | ||
1700 | UUID groupID, DeRezAction action, UUID destinationID) | ||
1701 | { | ||
1702 | foreach (uint localID in localIDs) | ||
1703 | { | ||
1704 | DeRezObject(remoteClient, localID, groupID, action, destinationID); | ||
1705 | } | ||
1706 | } | ||
1707 | |||
1708 | /// <summary> | ||
1709 | /// Called when an object is removed from the environment into inventory. | ||
1710 | /// </summary> | ||
1711 | /// <param name="remoteClient"></param> | ||
1712 | /// <param name="localID"></param> | ||
1713 | /// <param name="groupID"></param> | ||
1714 | /// <param name="action"></param> | ||
1715 | /// <param name="destinationID"></param> | ||
1716 | public virtual void DeRezObject(IClientAPI remoteClient, uint localID, | ||
1717 | UUID groupID, DeRezAction action, UUID destinationID) | ||
1718 | { | ||
1719 | DeRezObjects(remoteClient, new List<uint>() { localID }, groupID, action, destinationID); | ||
1720 | } | ||
1721 | |||
1722 | public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs, | 1691 | public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs, |
1723 | UUID groupID, DeRezAction action, UUID destinationID) | 1692 | UUID groupID, DeRezAction action, UUID destinationID) |
1724 | { | 1693 | { |
@@ -2003,14 +1972,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
2003 | return group; | 1972 | return group; |
2004 | } | 1973 | } |
2005 | 1974 | ||
2006 | public virtual bool returnObjects(SceneObjectGroup[] returnobjects, UUID AgentId) | 1975 | public virtual bool returnObjects(SceneObjectGroup[] returnobjects, |
1976 | UUID AgentId) | ||
2007 | { | 1977 | { |
1978 | List<uint> localIDs = new List<uint>(); | ||
1979 | |||
2008 | foreach (SceneObjectGroup grp in returnobjects) | 1980 | foreach (SceneObjectGroup grp in returnobjects) |
2009 | { | 1981 | { |
2010 | AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); | 1982 | AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, |
2011 | DeRezObject(null, grp.RootPart.LocalId, | 1983 | "parcel owner return"); |
2012 | grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); | 1984 | localIDs.Add(grp.RootPart.LocalId); |
2013 | } | 1985 | } |
1986 | DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return, | ||
1987 | UUID.Zero); | ||
2014 | 1988 | ||
2015 | return true; | 1989 | return true; |
2016 | } | 1990 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e835281..bcc439c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2823,7 +2823,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2823 | client.OnGrabUpdate += m_sceneGraph.MoveObject; | 2823 | client.OnGrabUpdate += m_sceneGraph.MoveObject; |
2824 | client.OnSpinStart += m_sceneGraph.SpinStart; | 2824 | client.OnSpinStart += m_sceneGraph.SpinStart; |
2825 | client.OnSpinUpdate += m_sceneGraph.SpinObject; | 2825 | client.OnSpinUpdate += m_sceneGraph.SpinObject; |
2826 | client.OnDeRezObject += DeRezObject; | 2826 | client.OnDeRezObject += DeRezObjects; |
2827 | 2827 | ||
2828 | client.OnObjectName += m_sceneGraph.PrimName; | 2828 | client.OnObjectName += m_sceneGraph.PrimName; |
2829 | client.OnObjectClickAction += m_sceneGraph.PrimClickAction; | 2829 | client.OnObjectClickAction += m_sceneGraph.PrimClickAction; |
@@ -2953,7 +2953,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2953 | client.OnGrabUpdate -= m_sceneGraph.MoveObject; | 2953 | client.OnGrabUpdate -= m_sceneGraph.MoveObject; |
2954 | client.OnSpinStart -= m_sceneGraph.SpinStart; | 2954 | client.OnSpinStart -= m_sceneGraph.SpinStart; |
2955 | client.OnSpinUpdate -= m_sceneGraph.SpinObject; | 2955 | client.OnSpinUpdate -= m_sceneGraph.SpinObject; |
2956 | client.OnDeRezObject -= DeRezObject; | 2956 | client.OnDeRezObject -= DeRezObjects; |
2957 | client.OnObjectName -= m_sceneGraph.PrimName; | 2957 | client.OnObjectName -= m_sceneGraph.PrimName; |
2958 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; | 2958 | client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; |
2959 | client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; | 2959 | client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a00a7c4..a6d89cf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1569,6 +1569,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1569 | ILandObject parcel = m_scene.LandChannel.GetLandObject( | 1569 | ILandObject parcel = m_scene.LandChannel.GetLandObject( |
1570 | m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y); | 1570 | m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y); |
1571 | 1571 | ||
1572 | List<uint> returns = new List<uint>(); | ||
1573 | |||
1572 | if (parcel != null && parcel.LandData != null && | 1574 | if (parcel != null && parcel.LandData != null && |
1573 | parcel.LandData.OtherCleanTime != 0) | 1575 | parcel.LandData.OtherCleanTime != 0) |
1574 | { | 1576 | { |
@@ -1582,13 +1584,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1582 | DetachFromBackup(); | 1584 | DetachFromBackup(); |
1583 | m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); | 1585 | m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); |
1584 | m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return"); | 1586 | m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return"); |
1585 | m_scene.DeRezObject(null, RootPart.LocalId, | 1587 | returns.Add(RootPart.LocalId); |
1586 | RootPart.GroupID, DeRezAction.Return, UUID.Zero); | ||
1587 | 1588 | ||
1588 | return; | 1589 | return; |
1589 | } | 1590 | } |
1590 | } | 1591 | } |
1591 | } | 1592 | } |
1593 | |||
1594 | m_scene.DeRezObjects(null, returns, UUID.Zero, | ||
1595 | DeRezAction.Return, UUID.Zero); | ||
1592 | } | 1596 | } |
1593 | 1597 | ||
1594 | if (HasGroupChanged) | 1598 | if (HasGroupChanged) |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 5616a4e..4969b09 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
142 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); | 142 | SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene); |
143 | 143 | ||
144 | IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); | 144 | IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); |
145 | scene.DeRezObject(client, part.LocalId, UUID.Zero, DeRezAction.Delete, UUID.Zero); | 145 | scene.DeRezObjects(client, new System.Collections.Generic.List<uint>() { part.LocalId }, UUID.Zero, DeRezAction.Delete, UUID.Zero); |
146 | 146 | ||
147 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 147 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); |
148 | 148 | ||