aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs31
1 files changed, 9 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d3d397d..d13d4fb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1194,15 +1194,6 @@ namespace OpenSim.Region.Framework.Scenes
1194 } 1194 }
1195 1195
1196 /// <summary> 1196 /// <summary>
1197 /// Perform delegate action on all clients subscribing to updates from this region.
1198 /// </summary>
1199 /// <returns></returns>
1200 public void Broadcast(Action<IClientAPI> whatToDo)
1201 {
1202 ForEachScenePresence(delegate(ScenePresence presence) { whatToDo(presence.ControllingClient); });
1203 }
1204
1205 /// <summary>
1206 /// Backup the scene. This acts as the main method of the backup thread. 1197 /// Backup the scene. This acts as the main method of the backup thread.
1207 /// </summary> 1198 /// </summary>
1208 /// <returns></returns> 1199 /// <returns></returns>
@@ -3048,17 +3039,13 @@ namespace OpenSim.Region.Framework.Scenes
3048 } 3039 }
3049 3040
3050 m_eventManager.TriggerOnRemovePresence(agentID); 3041 m_eventManager.TriggerOnRemovePresence(agentID);
3051 Broadcast(delegate(IClientAPI client) 3042 ForEachClient(
3052 { 3043 delegate(IClientAPI client)
3053 try 3044 {
3054 { 3045 //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway
3055 client.SendKillObject(avatar.RegionHandle, avatar.LocalId); 3046 try { client.SendKillObject(avatar.RegionHandle, avatar.LocalId); }
3056 } 3047 catch (NullReferenceException) { }
3057 catch (NullReferenceException) 3048 });
3058 {
3059 //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway.
3060 }
3061 });
3062 3049
3063 ForEachScenePresence( 3050 ForEachScenePresence(
3064 delegate(ScenePresence presence) { presence.CoarseLocationChange(); }); 3051 delegate(ScenePresence presence) { presence.CoarseLocationChange(); });
@@ -3143,7 +3130,7 @@ namespace OpenSim.Region.Framework.Scenes
3143 return; 3130 return;
3144 } 3131 }
3145 } 3132 }
3146 Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); 3133 ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); });
3147 } 3134 }
3148 3135
3149 #endregion 3136 #endregion
@@ -4211,7 +4198,7 @@ namespace OpenSim.Region.Framework.Scenes
4211 4198
4212 public void ForEachClient(Action<IClientAPI> action) 4199 public void ForEachClient(Action<IClientAPI> action)
4213 { 4200 {
4214 m_sceneGraph.ForEachClient(action); 4201 ClientManager.ForEach(action);
4215 } 4202 }
4216 4203
4217 public void ForEachSOG(Action<SceneObjectGroup> action) 4204 public void ForEachSOG(Action<SceneObjectGroup> action)