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/Scenes/SceneGraph.cs | |
parent | * Makes EntityManager IEnumerable - meaning we should be good to go to enable... (diff) | |
download | opensim-SC_OLD-47829849d99e1ec6e11ac26e1f892cbaf94d5503.zip opensim-SC_OLD-47829849d99e1ec6e11ac26e1f892cbaf94d5503.tar.gz opensim-SC_OLD-47829849d99e1ec6e11ac26e1f892cbaf94d5503.tar.bz2 opensim-SC_OLD-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/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneGraph.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs index 05ad996..2c75867 100644 --- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs | |||
@@ -59,7 +59,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
59 | protected internal Dictionary<UUID, ScenePresence> ScenePresences = new Dictionary<UUID, ScenePresence>(); | 59 | protected internal Dictionary<UUID, ScenePresence> ScenePresences = new Dictionary<UUID, ScenePresence>(); |
60 | // SceneObjects is not currently populated or used. | 60 | // SceneObjects is not currently populated or used. |
61 | //public Dictionary<UUID, SceneObjectGroup> SceneObjects; | 61 | //public Dictionary<UUID, SceneObjectGroup> SceneObjects; |
62 | protected internal Dictionary<UUID, EntityBase> Entities = new Dictionary<UUID, EntityBase>(); | 62 | protected internal EntityManager Entities = new EntityManager(); |
63 | // protected internal Dictionary<UUID, EntityBase> Entities = new Dictionary<UUID, EntityBase>(); | ||
63 | protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>(); | 64 | protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>(); |
64 | 65 | ||
65 | protected internal BasicQuadTreeNode QuadTree; | 66 | protected internal BasicQuadTreeNode QuadTree; |
@@ -972,10 +973,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
972 | /// <returns></returns> | 973 | /// <returns></returns> |
973 | protected internal List<EntityBase> GetEntities() | 974 | protected internal List<EntityBase> GetEntities() |
974 | { | 975 | { |
975 | lock (Entities) | 976 | return Entities.GetEntities(); |
976 | { | ||
977 | return new List<EntityBase>(Entities.Values); | ||
978 | } | ||
979 | } | 977 | } |
980 | 978 | ||
981 | protected internal Dictionary<uint, float> GetTopScripts() | 979 | protected internal Dictionary<uint, float> GetTopScripts() |