diff options
author | Dan Lake | 2010-03-19 05:51:16 -0700 |
---|---|---|
committer | John Hurliman | 2010-03-19 15:16:35 -0700 |
commit | 859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046 (patch) | |
tree | dcce6c74d201b52c1a04ec9ec2cb90ce068fc020 /OpenSim/Region/CoreModules/World/Sun/SunModule.cs | |
parent | Inconsistent locking of ScenePresence array in SceneGraph. Fixed by eliminati... (diff) | |
download | opensim-SC_OLD-859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046.zip opensim-SC_OLD-859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046.tar.gz opensim-SC_OLD-859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046.tar.bz2 opensim-SC_OLD-859bc717a4fe4cd5810ad9889cfb9b1e7f5c2046.tar.xz |
Cleaned up access to scenepresences in scenegraph. GetScenePresences and GetAvatars have been removed to consolidate locking and iteration within SceneGraph. All callers which used these to then iterate over presences have been refactored to instead pass their delegates to Scene.ForEachScenePresence(Action<ScenePresence>).
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Sun/SunModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Sun/SunModule.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index 0712a7f..a6dc2ec 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs | |||
@@ -509,14 +509,13 @@ namespace OpenSim.Region.CoreModules | |||
509 | 509 | ||
510 | private void SunUpdateToAllClients() | 510 | private void SunUpdateToAllClients() |
511 | { | 511 | { |
512 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 512 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) |
513 | foreach (ScenePresence avatar in avatars) | ||
514 | { | 513 | { |
515 | if (!avatar.IsChildAgent) | 514 | if (!sp.IsChildAgent) |
516 | { | 515 | { |
517 | SunToClient(avatar.ControllingClient); | 516 | SunToClient(sp.ControllingClient); |
518 | } | 517 | } |
519 | } | 518 | }); |
520 | } | 519 | } |
521 | 520 | ||
522 | #region ISunModule Members | 521 | #region ISunModule Members |