* Slightly increase ScenePresences locking where it's technically required in SceneGraph
parent
8d035b196d
commit
9e297cd722
|
@ -837,7 +837,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
protected internal ScenePresence GetScenePresence(UUID agentID)
|
||||
{
|
||||
ScenePresence sp;
|
||||
|
||||
lock (ScenePresences)
|
||||
{
|
||||
ScenePresences.TryGetValue(agentID, out sp);
|
||||
}
|
||||
|
||||
return sp;
|
||||
}
|
||||
|
@ -968,6 +972,9 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
protected internal bool TryGetAvatar(UUID avatarId, out ScenePresence avatar)
|
||||
{
|
||||
ScenePresence presence;
|
||||
|
||||
lock (ScenePresences)
|
||||
{
|
||||
if (ScenePresences.TryGetValue(avatarId, out presence))
|
||||
{
|
||||
avatar = presence;
|
||||
|
@ -985,6 +992,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
// avatarId, m_parentScene.RegionInfo.RegionName);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
avatar = null;
|
||||
return false;
|
||||
|
@ -1483,7 +1491,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
parenPrim.GetProperties(client);
|
||||
else
|
||||
{
|
||||
foreach (ScenePresence p in ScenePresences.Values)
|
||||
foreach (ScenePresence p in GetScenePresences())
|
||||
{
|
||||
parenPrim.GetProperties(p.ControllingClient);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue