diff options
author | Jeff Ames | 2008-09-09 01:26:48 +0000 |
---|---|---|
committer | Jeff Ames | 2008-09-09 01:26:48 +0000 |
commit | fae34bb10cfa10702faf5c19d8c8517faa018cb5 (patch) | |
tree | 2001f24703b010957254dbb49ef5e222ff30b84d /OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | |
parent | Fix state xxx within state xxx itself triggering a state "change" to (diff) | |
download | opensim-SC_OLD-fae34bb10cfa10702faf5c19d8c8517faa018cb5.zip opensim-SC_OLD-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.gz opensim-SC_OLD-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.bz2 opensim-SC_OLD-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.xz |
Update svn properties, formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs index e1b4129..1a41c7b 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | #region Header | 28 | #region Header |
29 | 29 | ||
30 | // CMModel.cs | 30 | // CMModel.cs |
31 | // User: bongiojp | 31 | // User: bongiojp |
32 | // | 32 | // |
33 | // | 33 | // |
34 | 34 | ||
@@ -100,13 +100,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
100 | ArrayList missingList = null; | 100 | ArrayList missingList = null; |
101 | ArrayList newList = new ArrayList(); | 101 | ArrayList newList = new ArrayList(); |
102 | 102 | ||
103 | m_log.Debug("[CONTENT MANAGEMENT] Checking for new scene object parts in scene: " + scene.RegionInfo.RegionName); | 103 | m_log.Debug("[CONTENT MANAGEMENT] Checking for new scene object parts in scene: " + scene.RegionInfo.RegionName); |
104 | 104 | ||
105 | //Check if the current scene has groups not included in the current list of MetaEntities | 105 | //Check if the current scene has groups not included in the current list of MetaEntities |
106 | //If so, then the current scene's parts that are new should be marked green. | 106 | //If so, then the current scene's parts that are new should be marked green. |
107 | missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities()); | 107 | missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities()); |
108 | 108 | ||
109 | foreach(Object missingPart in missingList) | 109 | foreach (Object missingPart in missingList) |
110 | { | 110 | { |
111 | if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) | 111 | if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) |
112 | continue; | 112 | continue; |
@@ -175,16 +175,16 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
175 | public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group) | 175 | public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group) |
176 | { | 176 | { |
177 | // Deal with new parts not revisioned that have been deleted. | 177 | // Deal with new parts not revisioned that have been deleted. |
178 | foreach(SceneObjectPart part in group.Children.Values) | 178 | foreach (SceneObjectPart part in group.Children.Values) |
179 | if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) | 179 | if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) |
180 | m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID); | 180 | m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID); |
181 | } | 181 | } |
182 | 182 | ||
183 | /// <summary> | 183 | /// <summary> |
184 | /// Retrieves the latest revision of a region in xml form, | 184 | /// Retrieves the latest revision of a region in xml form, |
185 | /// converts it to scene object groups and scene presences, | 185 | /// converts it to scene object groups and scene presences, |
186 | /// swaps the current scene's entity list with the revision's list. | 186 | /// swaps the current scene's entity list with the revision's list. |
187 | /// Note: Since deleted objects while | 187 | /// Note: Since deleted objects while |
188 | /// </summary> | 188 | /// </summary> |
189 | public void RollbackRegion(Scene scene) | 189 | public void RollbackRegion(Scene scene) |
190 | { | 190 | { |
@@ -214,26 +214,26 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
214 | try{ | 214 | try{ |
215 | temp = new SceneObjectGroup(xml); | 215 | temp = new SceneObjectGroup(xml); |
216 | temp.SetScene(scene); | 216 | temp.SetScene(scene); |
217 | foreach(SceneObjectPart part in temp.Children.Values) | 217 | foreach (SceneObjectPart part in temp.Children.Values) |
218 | part.RegionHandle = scene.RegionInfo.RegionHandle; | 218 | part.RegionHandle = scene.RegionInfo.RegionHandle; |
219 | ReplacementList.Add(temp.UUID, (EntityBase)temp); | 219 | ReplacementList.Add(temp.UUID, (EntityBase)temp); |
220 | } | 220 | } |
221 | catch(Exception e) | 221 | catch(Exception e) |
222 | { | 222 | { |
223 | m_log.Info("[CMMODEL]: Error while creating replacement list for rollback: " + e); | 223 | m_log.Info("[CMMODEL]: Error while creating replacement list for rollback: " + e); |
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | //If in scene but not in revision and not a client, remove them | 227 | //If in scene but not in revision and not a client, remove them |
228 | while (true) | 228 | while (true) |
229 | { | 229 | { |
230 | try | 230 | try |
231 | { | 231 | { |
232 | foreach(EntityBase entity in scene.GetEntities()) | 232 | foreach (EntityBase entity in scene.GetEntities()) |
233 | { | 233 | { |
234 | if (entity == null) | 234 | if (entity == null) |
235 | continue; | 235 | continue; |
236 | 236 | ||
237 | if (entity is ScenePresence) | 237 | if (entity is ScenePresence) |
238 | { | 238 | { |
239 | ReplacementList.Add(entity.UUID, entity); | 239 | ReplacementList.Add(entity.UUID, entity); |
@@ -253,9 +253,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
253 | break; | 253 | break; |
254 | } | 254 | } |
255 | 255 | ||
256 | foreach(UUID uuid in deleteListUUIDs.Keys) | 256 | foreach (UUID uuid in deleteListUUIDs.Keys) |
257 | { | 257 | { |
258 | try | 258 | try |
259 | { | 259 | { |
260 | // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. | 260 | // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. |
261 | ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); | 261 | ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); |
@@ -275,13 +275,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
275 | scene.Entities = ReplacementList; | 275 | scene.Entities = ReplacementList; |
276 | } | 276 | } |
277 | 277 | ||
278 | foreach(EntityBase ent in ReplacementList.Values) | 278 | foreach (EntityBase ent in ReplacementList.Values) |
279 | { | 279 | { |
280 | try | 280 | try |
281 | { | 281 | { |
282 | if (!(ent is SceneObjectGroup)) | 282 | if (!(ent is SceneObjectGroup)) |
283 | continue; | 283 | continue; |
284 | 284 | ||
285 | if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0) | 285 | if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0) |
286 | ((SceneObjectGroup)ent).ApplyPhysics(true); | 286 | ((SceneObjectGroup)ent).ApplyPhysics(true); |
287 | ((SceneObjectGroup)ent).AttachToBackup(); | 287 | ((SceneObjectGroup)ent).AttachToBackup(); |
@@ -319,15 +319,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
319 | m_MetaEntityCollection.CreateNewEntity(xml, scene); | 319 | m_MetaEntityCollection.CreateNewEntity(xml, scene); |
320 | y.Stop(); | 320 | y.Stop(); |
321 | TimeToConvertXml += y.ElapsedMilliseconds; | 321 | TimeToConvertXml += y.ElapsedMilliseconds; |
322 | m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities for " + scene.RegionInfo.RegionName + ": " + y.ElapsedMilliseconds); | 322 | m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities for " + scene.RegionInfo.RegionName + ": " + y.ElapsedMilliseconds); |
323 | m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities so far: " + TimeToConvertXml); | 323 | m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities so far: " + TimeToConvertXml); |
324 | 324 | ||
325 | m_log.Info("[FSDB]: checking for new scene object parts missing green auras and create the auras"); | 325 | m_log.Info("[FSDB]: checking for new scene object parts missing green auras and create the auras"); |
326 | CheckForNewEntitiesMissingAuras(scene); | 326 | CheckForNewEntitiesMissingAuras(scene); |
327 | 327 | ||
328 | x.Stop(); | 328 | x.Stop(); |
329 | TimeToUpdate += x.ElapsedMilliseconds; | 329 | TimeToUpdate += x.ElapsedMilliseconds; |
330 | m_log.Info("[FileSystemDatabase] Time spent Updating entity list for " + scene.RegionInfo.RegionName + ": " + x.ElapsedMilliseconds); | 330 | m_log.Info("[FileSystemDatabase] Time spent Updating entity list for " + scene.RegionInfo.RegionName + ": " + x.ElapsedMilliseconds); |
331 | m_log.Info("[FileSystemDatabase] Time spent Updating so far: " + TimeToUpdate); | 331 | m_log.Info("[FileSystemDatabase] Time spent Updating so far: " + TimeToUpdate); |
332 | } | 332 | } |
333 | 333 | ||
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
340 | System.Collections.ArrayList auraList = new System.Collections.ArrayList(); | 340 | System.Collections.ArrayList auraList = new System.Collections.ArrayList(); |
341 | if (group == null) | 341 | if (group == null) |
342 | return null; | 342 | return null; |
343 | foreach(SceneObjectPart part in group.Children.Values) | 343 | foreach (SceneObjectPart part in group.Children.Values) |
344 | { | 344 | { |
345 | if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) | 345 | if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) |
346 | { | 346 | { |