diff options
author | Adam Frisby | 2008-11-24 14:45:05 +0000 |
---|---|---|
committer | Adam Frisby | 2008-11-24 14:45:05 +0000 |
commit | 47829849d99e1ec6e11ac26e1f892cbaf94d5503 (patch) | |
tree | 8f6d4371874f1716312bf0752e9251f20dc920c2 /OpenSim/Region/Environment/Modules | |
parent | * Makes EntityManager IEnumerable - meaning we should be good to go to enable... (diff) | |
download | opensim-SC-47829849d99e1ec6e11ac26e1f892cbaf94d5503.zip opensim-SC-47829849d99e1ec6e11ac26e1f892cbaf94d5503.tar.gz opensim-SC-47829849d99e1ec6e11ac26e1f892cbaf94d5503.tar.bz2 opensim-SC-47829849d99e1ec6e11ac26e1f892cbaf94d5503.tar.xz |
* Swaps Scene.Entities Dictionary for EntityManager.
* Important Changes: Scene.Entities is now IEnumerable directly. You do not need to use Entities.Values, you can Enumerate on .Entities directly. (So 'foreach Scene.Entities' vs 'foreach Scene.Entities.Values').
* Locks: Entities maintains it's own internal locking states. This means you do not need to lock entities anymore. I'll be going through and removing locks on it systematically.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs index 5229489..65fa9ba 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs | |||
@@ -272,7 +272,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement | |||
272 | 272 | ||
273 | lock (scene) | 273 | lock (scene) |
274 | { | 274 | { |
275 | scene.Entities = ReplacementList; | 275 | scene.Entities.Clear(); |
276 | |||
277 | foreach(KeyValuePair<UUID,EntityBase> kvp in ReplacementList) | ||
278 | { | ||
279 | scene.Entities.Add(kvp.Value); | ||
280 | } | ||
276 | } | 281 | } |
277 | 282 | ||
278 | foreach (EntityBase ent in ReplacementList.Values) | 283 | foreach (EntityBase ent in ReplacementList.Values) |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs index fe2458c..d33201f 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | |||
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
666 | ResetAllLandPrimCounts(); | 666 | ResetAllLandPrimCounts(); |
667 | lock (m_scene.Entities) | 667 | lock (m_scene.Entities) |
668 | { | 668 | { |
669 | foreach (EntityBase obj in m_scene.Entities.Values) | 669 | foreach (EntityBase obj in m_scene.Entities) |
670 | { | 670 | { |
671 | if (obj != null) | 671 | if (obj != null) |
672 | { | 672 | { |