aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs7
4 files changed, 31 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index 7016d1b..dc81f41 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -30,6 +30,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife;
33using log4net; 34using log4net;
34using Nini.Config; 35using Nini.Config;
35 36
@@ -71,12 +72,23 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
71 public void ArchiveRegion(string savePath) 72 public void ArchiveRegion(string savePath)
72 { 73 {
73 m_log.Warn("[ARCHIVER]: Archive region not yet implemented"); 74 m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
75
76 Dictionary<LLUUID, int> textureUuids = new Dictionary<LLUUID, int>();
74 77
75 List<EntityBase> entities = m_scene.GetEntities(); 78 List<EntityBase> entities = m_scene.GetEntities();
76 79
77 foreach (EntityBase entity in entities) 80 foreach (EntityBase entity in entities)
78 { 81 {
79 82 if (entity is SceneObjectGroup)
83 {
84 SceneObjectGroup sceneObject = (SceneObjectGroup)entity;
85
86 foreach (SceneObjectPart part in sceneObject.GetParts())
87 {
88 LLUUID texture = new LLUUID(part.Shape.TextureEntry, 0);
89 textureUuids[texture] = 1;
90 }
91 }
80 } 92 }
81 93
82 string serEntities = SerializeObjects(entities); 94 string serEntities = SerializeObjects(entities);
@@ -84,6 +96,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
84 if (serEntities != null && serEntities.Length > 0) 96 if (serEntities != null && serEntities.Length > 0)
85 { 97 {
86 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); 98 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
99 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count);
87 } 100 }
88 } 101 }
89 102
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 1bcd3fd..f4ec1a3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -197,6 +197,14 @@ namespace OpenSim.Region.Environment.Scenes
197 // set { m_innerScene.SceneObjects = value; } 197 // set { m_innerScene.SceneObjects = value; }
198 // } 198 // }
199 199
200 /// <summary>
201 /// The dictionary of all entities in this scene. The contents of this dictionary may be changed at any time.
202 /// If you wish to add or remove entities, please use the appropriate method for that entity rather than
203 /// editing this dictionary directly.
204 ///
205 /// If you want a list of entities where the list itself is guaranteed not to change, please use
206 /// GetEntities()
207 /// </summary>
200 public Dictionary<LLUUID, EntityBase> Entities 208 public Dictionary<LLUUID, EntityBase> Entities
201 { 209 {
202 get { return m_innerScene.Entities; } 210 get { return m_innerScene.Entities; }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2ad01f9..a85c8d3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -92,8 +92,6 @@ namespace OpenSim.Region.Environment.Scenes
92 public bool HasGroupChanged = false; 92 public bool HasGroupChanged = false;
93 public float scriptScore = 0f; 93 public float scriptScore = 0f;
94 94
95
96
97 private LLVector3 lastPhysGroupPos; 95 private LLVector3 lastPhysGroupPos;
98 private LLQuaternion lastPhysGroupRot; 96 private LLQuaternion lastPhysGroupRot;
99 97
@@ -2054,6 +2052,12 @@ namespace OpenSim.Region.Environment.Scenes
2054 } 2052 }
2055 } 2053 }
2056 2054
2055 /// <summary>
2056 /// Get the parts of this scene object
2057 /// </summary>
2058 /// <returns>
2059 /// A <see cref="SceneObjectPart"/>
2060 /// </returns>
2057 public SceneObjectPart[] GetParts() 2061 public SceneObjectPart[] GetParts()
2058 { 2062 {
2059 int numParts = Children.Count; 2063 int numParts = Children.Count;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index c6b3059..4b174e3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -85,7 +85,6 @@ namespace OpenSim.Region.Environment.Scenes
85 [Serializable] 85 [Serializable]
86 public partial class SceneObjectPart : IScriptHost, ISerializable 86 public partial class SceneObjectPart : IScriptHost, ISerializable
87 { 87 {
88
89 [XmlIgnore] public PhysicsActor PhysActor = null; 88 [XmlIgnore] public PhysicsActor PhysActor = null;
90 89
91 public LLUUID LastOwnerID; 90 public LLUUID LastOwnerID;
@@ -103,7 +102,6 @@ namespace OpenSim.Region.Environment.Scenes
103 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; 102 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
104 [XmlIgnore] public bool DIE_AT_EDGE = false; 103 [XmlIgnore] public bool DIE_AT_EDGE = false;
105 104
106
107 [XmlIgnore] public bool m_IsAttachment = false; 105 [XmlIgnore] public bool m_IsAttachment = false;
108 [XmlIgnore] public uint m_attachmentPoint = (byte)0; 106 [XmlIgnore] public uint m_attachmentPoint = (byte)0;
109 [XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero; 107 [XmlIgnore] public LLUUID m_attachedAvatar = LLUUID.Zero;
@@ -700,7 +698,6 @@ namespace OpenSim.Region.Environment.Scenes
700 get { return m_shape; } 698 get { return m_shape; }
701 set 699 set
702 { 700 {
703
704 m_shape = value; 701 m_shape = value;
705 TriggerScriptChangedEvent(Changed.SHAPE); 702 TriggerScriptChangedEvent(Changed.SHAPE);
706 } 703 }
@@ -1949,6 +1946,7 @@ namespace OpenSim.Region.Environment.Scenes
1949 public void UpdateExtraParam(ushort type, bool inUse, byte[] data) 1946 public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
1950 { 1947 {
1951 m_shape.ReadInUpdateExtraParam(type, inUse, data); 1948 m_shape.ReadInUpdateExtraParam(type, inUse, data);
1949
1952 if (type == 0x30) 1950 if (type == 0x30)
1953 { 1951 {
1954 if (m_shape.SculptEntry && m_shape.SculptTexture != LLUUID.Zero) 1952 if (m_shape.SculptEntry && m_shape.SculptTexture != LLUUID.Zero)
@@ -1957,9 +1955,10 @@ namespace OpenSim.Region.Environment.Scenes
1957 m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true); 1955 m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true);
1958 } 1956 }
1959 } 1957 }
1958
1960 ScheduleFullUpdate(); 1959 ScheduleFullUpdate();
1961
1962 } 1960 }
1961
1963 public void SculptTextureCallback(LLUUID textureID, AssetBase texture) 1962 public void SculptTextureCallback(LLUUID textureID, AssetBase texture)
1964 { 1963 {
1965 if (m_shape.SculptEntry) 1964 if (m_shape.SculptEntry)