aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-07 22:08:58 +0000
committerJustin Clarke Casey2008-11-07 22:08:58 +0000
commitba1d9ca26b7b5e865824e16dc8930e85ef27eb54 (patch)
treef294fd0129360fef926a7ebd610adf4b7b813afa /OpenSim/Region/Environment/Modules
parent* Rename PrimIDAllocate() to more effectively convey what it does, and put th... (diff)
downloadopensim-SC-ba1d9ca26b7b5e865824e16dc8930e85ef27eb54.zip
opensim-SC-ba1d9ca26b7b5e865824e16dc8930e85ef27eb54.tar.gz
opensim-SC-ba1d9ca26b7b5e865824e16dc8930e85ef27eb54.tar.bz2
opensim-SC-ba1d9ca26b7b5e865824e16dc8930e85ef27eb54.tar.xz
* refactor: cleanup AllocateLocalPrimId() a bit more
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs12
7 files changed, 15 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index aab863a..64b48fe 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -57,14 +57,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
57 #region Constructors 57 #region Constructors
58 58
59 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency. 59 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency.
60 public AuraMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale) 60 public AuraMetaEntity(Scene scene, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
61 : base(scene, LocalId, groupPos, transparency) 61 : base(scene, groupPos, transparency)
62 { 62 {
63 SetAura(color, scale); 63 SetAura(color, scale);
64 } 64 }
65 65
66 public AuraMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale) 66 public AuraMetaEntity(Scene scene, UUID uuid, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
67 : base(scene, uuid, LocalId, groupPos, transparency) 67 : base(scene, uuid, groupPos, transparency)
68 { 68 {
69 SetAura(color, scale); 69 SetAura(color, scale);
70 } 70 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index ca20ee6..d0015f7 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -56,14 +56,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
56 { 56 {
57 #region Constructors 57 #region Constructors
58 58
59 public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) 59 public BeamMetaEntity(Scene scene, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
60 : base(scene, LocalId, groupPos, transparency) 60 : base(scene, groupPos, transparency)
61 { 61 {
62 SetBeamToUUID(To, color); 62 SetBeamToUUID(To, color);
63 } 63 }
64 64
65 public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color) 65 public BeamMetaEntity(Scene scene, UUID uuid, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
66 : base(scene, uuid, LocalId, groupPos, transparency) 66 : base(scene, uuid, groupPos, transparency)
67 { 67 {
68 SetBeamToUUID(To, color); 68 SetBeamToUUID(To, color);
69 } 69 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index f8c8a96..c1f8a8a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -146,7 +146,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
146 public AuraMetaEntity CreateAuraForNewlyCreatedEntity(SceneObjectPart part) 146 public AuraMetaEntity CreateAuraForNewlyCreatedEntity(SceneObjectPart part)
147 { 147 {
148 AuraMetaEntity ent = new AuraMetaEntity(part.ParentGroup.Scene, 148 AuraMetaEntity ent = new AuraMetaEntity(part.ParentGroup.Scene,
149 part.ParentGroup.Scene.AllocateLocalPrimId(),
150 part.GetWorldPosition(), 149 part.GetWorldPosition(),
151 MetaEntity.TRANSLUCENT, 150 MetaEntity.TRANSLUCENT,
152 new Vector3(0,254,0), 151 new Vector3(0,254,0),
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index 9d81262..e58d945 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
110 { 110 {
111 if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) 111 if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
112 continue; 112 continue;
113 newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart)); 113 newList.Add(m_MetaEntityCollection.CreateAuraForNewlyCreatedEntity((SceneObjectPart)missingPart));
114 } 114 }
115 m_log.Info("Number of missing objects found: " + newList.Count); 115 m_log.Info("Number of missing objects found: " + newList.Count);
116 return newList; 116 return newList;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index ac2af34..d0b5929 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -153,7 +153,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
153 else 153 else
154 { 154 {
155 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 155 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
156 m_Entity.Scene.AllocateLocalPrimId(),
157 part.GetWorldPosition(), 156 part.GetWorldPosition(),
158 MetaEntity.TRANSLUCENT, 157 MetaEntity.TRANSLUCENT,
159 new Vector3(254,0,0), 158 new Vector3(254,0,0),
@@ -260,7 +259,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
260 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); 259 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
261 } 260 }
262 BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene, 261 BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
263 m_Entity.Scene.AllocateLocalPrimId(),
264 m_UnchangedEntity.RootPart.GetWorldPosition(), 262 m_UnchangedEntity.RootPart.GetWorldPosition(),
265 MetaEntity.TRANSLUCENT, 263 MetaEntity.TRANSLUCENT,
266 sceneEntityPart, 264 sceneEntityPart,
@@ -275,7 +273,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
275 m_AuraEntities.Remove(UnchangedPart.UUID); 273 m_AuraEntities.Remove(UnchangedPart.UUID);
276 } 274 }
277 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 275 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
278 m_Entity.Scene.AllocateLocalPrimId(),
279 UnchangedPart.GetWorldPosition(), 276 UnchangedPart.GetWorldPosition(),
280 MetaEntity.TRANSLUCENT, 277 MetaEntity.TRANSLUCENT,
281 new Vector3(0,0,254), 278 new Vector3(0,0,254),
@@ -309,7 +306,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
309 m_AuraEntities.Remove(UnchangedPart.UUID); 306 m_AuraEntities.Remove(UnchangedPart.UUID);
310 } 307 }
311 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 308 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
312 m_Entity.Scene.AllocateLocalPrimId(),
313 UnchangedPart.GetWorldPosition(), 309 UnchangedPart.GetWorldPosition(),
314 MetaEntity.TRANSLUCENT, 310 MetaEntity.TRANSLUCENT,
315 new Vector3(254,0,0), 311 new Vector3(254,0,0),
@@ -317,7 +313,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
317 ); 313 );
318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 314 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
319 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT); 315 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
320 316
321 DiffersFromSceneGroup = true; 317 DiffersFromSceneGroup = true;
322 } 318 }
323 } 319 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index a96547b..801f8ff 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -166,10 +166,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
166 parts.Add(part.UUID, part); 166 parts.Add(part.UUID, part);
167 } 167 }
168 168
169 // make new localids
170 foreach (SceneObjectPart part in m_Entity.Children.Values)
171 part.LocalId = m_Entity.Scene.AllocateLocalPrimId();
172
173 //finalize 169 //finalize
174 m_Entity.RootPart.PhysActor = null; 170 m_Entity.RootPart.PhysActor = null;
175 m_Entity.Children = parts; 171 m_Entity.Children = parts;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index 81746c5..bf7d944 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -56,17 +56,17 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
56 { 56 {
57 #region Constructors 57 #region Constructors
58 58
59 public PointMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency) 59 public PointMetaEntity(Scene scene, Vector3 groupPos, float transparency)
60 : base() 60 : base()
61 { 61 {
62 CreatePointEntity(scene, UUID.Random(), LocalId, groupPos); 62 CreatePointEntity(scene, UUID.Random(), groupPos);
63 SetPartTransparency(m_Entity.RootPart, transparency); 63 SetPartTransparency(m_Entity.RootPart, transparency);
64 } 64 }
65 65
66 public PointMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency) 66 public PointMetaEntity(Scene scene, UUID uuid, Vector3 groupPos, float transparency)
67 : base() 67 : base()
68 { 68 {
69 CreatePointEntity(scene, uuid, LocalId, groupPos); 69 CreatePointEntity(scene, uuid, groupPos);
70 SetPartTransparency(m_Entity.RootPart, transparency); 70 SetPartTransparency(m_Entity.RootPart, transparency);
71 } 71 }
72 72
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
74 74
75 #region Private Methods 75 #region Private Methods
76 76
77 private void CreatePointEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos) 77 private void CreatePointEntity(Scene scene, UUID uuid, Vector3 groupPos)
78 { 78 {
79 SceneObjectGroup x = new SceneObjectGroup(); 79 SceneObjectGroup x = new SceneObjectGroup();
80 SceneObjectPart y = new SceneObjectPart(); 80 SceneObjectPart y = new SceneObjectPart();
@@ -88,8 +88,6 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
88 y.LastOwnerID = UUID.Zero; 88 y.LastOwnerID = UUID.Zero;
89 y.UUID = uuid; 89 y.UUID = uuid;
90 90
91 y.LocalId = LocalId;
92
93 y.Shape = PrimitiveBaseShape.CreateBox(); 91 y.Shape = PrimitiveBaseShape.CreateBox();
94 y.Scale = new Vector3(0.01f,0.01f,0.01f); 92 y.Scale = new Vector3(0.01f,0.01f,0.01f);
95 y.LastOwnerID = UUID.Zero; 93 y.LastOwnerID = UUID.Zero;