aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrain.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs44
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneViewer.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs6
8 files changed, 25 insertions, 47 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrain.cs b/OpenSim/Region/Framework/Interfaces/ITerrain.cs
index 8aacb35..815a2d8 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrain.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrain.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using OpenSim.Framework; 28using OpenSim.Framework;
29using OpenMetaverse;
29 30
30namespace OpenSim.Region.Framework.Interfaces 31namespace OpenSim.Region.Framework.Interfaces
31{ 32{
@@ -74,6 +75,7 @@ namespace OpenSim.Region.Framework.Interfaces
74 public interface IMapImageGenerator 75 public interface IMapImageGenerator
75 { 76 {
76 System.Drawing.Bitmap CreateMapTile(); 77 System.Drawing.Bitmap CreateMapTile();
78 System.Drawing.Bitmap CreateViewImage(Vector3 camPos, Vector3 camDir, float fov, int width, int height, bool useTextures);
77 byte[] WriteJpeg2000Image(); 79 byte[] WriteJpeg2000Image();
78 } 80 }
79} 81}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 1bf6b87..4cc797b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1689,37 +1689,6 @@ namespace OpenSim.Region.Framework.Scenes
1689 } 1689 }
1690 } 1690 }
1691 1691
1692 /// <summary>
1693 /// Called when one or more objects are removed from the environment into inventory.
1694 /// </summary>
1695 /// <param name="remoteClient"></param>
1696 /// <param name="localID"></param>
1697 /// <param name="groupID"></param>
1698 /// <param name="action"></param>
1699 /// <param name="destinationID"></param>
1700 public virtual void DeRezObject(IClientAPI remoteClient, List<uint> localIDs,
1701 UUID groupID, DeRezAction action, UUID destinationID)
1702 {
1703 foreach (uint localID in localIDs)
1704 {
1705 DeRezObject(remoteClient, localID, groupID, action, destinationID);
1706 }
1707 }
1708
1709 /// <summary>
1710 /// Called when an object is removed from the environment into inventory.
1711 /// </summary>
1712 /// <param name="remoteClient"></param>
1713 /// <param name="localID"></param>
1714 /// <param name="groupID"></param>
1715 /// <param name="action"></param>
1716 /// <param name="destinationID"></param>
1717 public virtual void DeRezObject(IClientAPI remoteClient, uint localID,
1718 UUID groupID, DeRezAction action, UUID destinationID)
1719 {
1720 DeRezObjects(remoteClient, new List<uint>() { localID }, groupID, action, destinationID);
1721 }
1722
1723 public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs, 1692 public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs,
1724 UUID groupID, DeRezAction action, UUID destinationID) 1693 UUID groupID, DeRezAction action, UUID destinationID)
1725 { 1694 {
@@ -1990,14 +1959,19 @@ namespace OpenSim.Region.Framework.Scenes
1990 return group; 1959 return group;
1991 } 1960 }
1992 1961
1993 public virtual bool returnObjects(SceneObjectGroup[] returnobjects, UUID AgentId) 1962 public virtual bool returnObjects(SceneObjectGroup[] returnobjects,
1963 UUID AgentId)
1994 { 1964 {
1965 List<uint> localIDs = new List<uint>();
1966
1995 foreach (SceneObjectGroup grp in returnobjects) 1967 foreach (SceneObjectGroup grp in returnobjects)
1996 { 1968 {
1997 AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition, "parcel owner return"); 1969 AddReturn(grp.OwnerID, grp.Name, grp.AbsolutePosition,
1998 DeRezObject(null, grp.RootPart.LocalId, 1970 "parcel owner return");
1999 grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); 1971 localIDs.Add(grp.RootPart.LocalId);
2000 } 1972 }
1973 DeRezObjects(null, localIDs, UUID.Zero, DeRezAction.Return,
1974 UUID.Zero);
2001 1975
2002 return true; 1976 return true;
2003 } 1977 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index fe0ab5b..0cfc235 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2735,7 +2735,7 @@ namespace OpenSim.Region.Framework.Scenes
2735 client.OnGrabUpdate += m_sceneGraph.MoveObject; 2735 client.OnGrabUpdate += m_sceneGraph.MoveObject;
2736 client.OnSpinStart += m_sceneGraph.SpinStart; 2736 client.OnSpinStart += m_sceneGraph.SpinStart;
2737 client.OnSpinUpdate += m_sceneGraph.SpinObject; 2737 client.OnSpinUpdate += m_sceneGraph.SpinObject;
2738 client.OnDeRezObject += DeRezObject; 2738 client.OnDeRezObject += DeRezObjects;
2739 2739
2740 client.OnObjectName += m_sceneGraph.PrimName; 2740 client.OnObjectName += m_sceneGraph.PrimName;
2741 client.OnObjectClickAction += m_sceneGraph.PrimClickAction; 2741 client.OnObjectClickAction += m_sceneGraph.PrimClickAction;
@@ -2864,7 +2864,7 @@ namespace OpenSim.Region.Framework.Scenes
2864 client.OnGrabUpdate -= m_sceneGraph.MoveObject; 2864 client.OnGrabUpdate -= m_sceneGraph.MoveObject;
2865 client.OnSpinStart -= m_sceneGraph.SpinStart; 2865 client.OnSpinStart -= m_sceneGraph.SpinStart;
2866 client.OnSpinUpdate -= m_sceneGraph.SpinObject; 2866 client.OnSpinUpdate -= m_sceneGraph.SpinObject;
2867 client.OnDeRezObject -= DeRezObject; 2867 client.OnDeRezObject -= DeRezObjects;
2868 client.OnObjectName -= m_sceneGraph.PrimName; 2868 client.OnObjectName -= m_sceneGraph.PrimName;
2869 client.OnObjectClickAction -= m_sceneGraph.PrimClickAction; 2869 client.OnObjectClickAction -= m_sceneGraph.PrimClickAction;
2870 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial; 2870 client.OnObjectMaterial -= m_sceneGraph.PrimMaterial;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 5513584..5f00f84 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1304,8 +1304,8 @@ namespace OpenSim.Region.Framework.Scenes
1304 DetachFromBackup(); 1304 DetachFromBackup();
1305 m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString()); 1305 m_log.InfoFormat("[SCENE]: Returning object {0} due to parcel auto return", RootPart.UUID.ToString());
1306 m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return"); 1306 m_scene.AddReturn(OwnerID, Name, AbsolutePosition, "parcel auto return");
1307 m_scene.DeRezObject(null, RootPart.LocalId, 1307 m_scene.DeRezObjects(null, new List<uint>() { RootPart.LocalId }, UUID.Zero,
1308 RootPart.GroupID, DeRezAction.Return, UUID.Zero); 1308 DeRezAction.Return, UUID.Zero);
1309 1309
1310 return; 1310 return;
1311 } 1311 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a8e76e3..8140d42 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2763,7 +2763,7 @@ namespace OpenSim.Region.Framework.Scenes
2763 UUID = UUID.Random(); 2763 UUID = UUID.Random();
2764 LinkNum = linkNum; 2764 LinkNum = linkNum;
2765 LocalId = 0; 2765 LocalId = 0;
2766 Inventory.ResetInventoryIDs(); 2766 Inventory.ResetInventoryIDs();
2767 } 2767 }
2768 2768
2769 /// <summary> 2769 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a4533fa..13d9964 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1523,7 +1523,7 @@ namespace OpenSim.Region.Framework.Scenes
1523 } 1523 }
1524 1524
1525 // If the agent update does move the avatar, then calculate the force ready for the velocity update, 1525 // If the agent update does move the avatar, then calculate the force ready for the velocity update,
1526 // which occurs later in the main scene loop 1526 // which occurs later in the main scene loop
1527 if (update_movementflag || (update_rotation && DCFlagKeyPressed)) 1527 if (update_movementflag || (update_rotation && DCFlagKeyPressed))
1528 { 1528 {
1529 // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); 1529 // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index b45291f..b44a010 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -179,11 +179,13 @@ namespace OpenSim.Region.Framework.Scenes
179 179
180 public void Reset() 180 public void Reset()
181 { 181 {
182 if (m_pendingObjects != null) 182 if (m_pendingObjects == null)
183 return;
184
185 lock (m_pendingObjects)
183 { 186 {
184 lock (m_pendingObjects) 187 if (m_pendingObjects != null)
185 { 188 {
186
187 m_pendingObjects.Clear(); 189 m_pendingObjects.Clear();
188 m_pendingObjects = null; 190 m_pendingObjects = null;
189 } 191 }
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index e6ff0c0..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
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
210 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) 210 = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero)
211 { Name = childPartName, UUID = childPartUuid }; 211 { Name = childPartName, UUID = childPartUuid };
212 212
213 SceneObjectGroup sog = new SceneObjectGroup(rootPart); 213 SceneObjectGroup sog = new SceneObjectGroup(rootPart);
214 sog.AddPart(linkPart); 214 sog.AddPart(linkPart);
215 215
216 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid)); 216 Assert.That(sog.UUID, Is.EqualTo(rootPartUuid));
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
221 sog.UUID = newRootPartUuid; 221 sog.UUID = newRootPartUuid;
222 222
223 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid)); 223 Assert.That(sog.UUID, Is.EqualTo(newRootPartUuid));
224 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid)); 224 Assert.That(sog.RootPart.UUID, Is.EqualTo(newRootPartUuid));
225 Assert.That(sog.Parts.Length, Is.EqualTo(2)); 225 Assert.That(sog.Parts.Length, Is.EqualTo(2));
226 } 226 }
227 } 227 }