diff options
author | Justin Clarke Casey | 2008-05-13 18:40:36 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-13 18:40:36 +0000 |
commit | 16621fb37fe0b896052dc0641d847ecfc12cb04b (patch) | |
tree | 8892a5c0d2fb6b93c12623cc6579b5f993d82f94 | |
parent | * Refactor: Stop exposing the inner scene's ScenePresence dictionary directly... (diff) | |
download | opensim-SC_OLD-16621fb37fe0b896052dc0641d847ecfc12cb04b.zip opensim-SC_OLD-16621fb37fe0b896052dc0641d847ecfc12cb04b.tar.gz opensim-SC_OLD-16621fb37fe0b896052dc0641d847ecfc12cb04b.tar.bz2 opensim-SC_OLD-16621fb37fe0b896052dc0641d847ecfc12cb04b.tar.xz |
* Refactor: Remove locking from InnerScene.GetScenePresence()
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index aadcff6..5800f70 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -679,15 +679,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
679 | /// <returns>null if the agent was not found</returns> | 679 | /// <returns>null if the agent was not found</returns> |
680 | public ScenePresence GetScenePresence(LLUUID agentID) | 680 | public ScenePresence GetScenePresence(LLUUID agentID) |
681 | { | 681 | { |
682 | lock (ScenePresences) | 682 | ScenePresence sp; |
683 | { | 683 | ScenePresences.TryGetValue(agentID, out sp); |
684 | if (ScenePresences.ContainsKey(agentID)) | ||
685 | { | ||
686 | return ScenePresences[agentID]; | ||
687 | } | ||
688 | } | ||
689 | 684 | ||
690 | return null; | 685 | return sp; |
691 | } | 686 | } |
692 | 687 | ||
693 | private SceneObjectGroup GetGroupByPrim(uint localID) | 688 | private SceneObjectGroup GetGroupByPrim(uint localID) |