aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs54
1 files changed, 17 insertions, 37 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 5655e72..effd4b2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -1,20 +1,18 @@
1using System.Collections.Generic; 1using System;
2using System; 2using System.Collections.Generic;
3using OpenSim.Framework.Console; 3using OpenSim.Framework.Console;
4using OpenSim.Framework.Types; 4using OpenSim.Framework.Types;
5 5
6namespace OpenSim.Region.Environment.Scenes 6namespace OpenSim.Region.Environment.Scenes
7{ 7{
8 public class SceneManager 8 public class SceneManager
9 { 9 {
10 private readonly List<Scene> m_localScenes; 10 private readonly List<Scene> m_localScenes;
11 private Scene m_currentScene = null; 11 private Scene m_currentScene = null;
12
12 public Scene CurrentScene 13 public Scene CurrentScene
13 { 14 {
14 get 15 get { return m_currentScene; }
15 {
16 return m_currentScene;
17 }
18 } 16 }
19 17
20 private Scene CurrentOrFirstScene 18 private Scene CurrentOrFirstScene
@@ -83,18 +81,12 @@ namespace OpenSim.Region.Environment.Scenes
83 81
84 public void SendCommandToScripts(string[] cmdparams) 82 public void SendCommandToScripts(string[] cmdparams)
85 { 83 {
86 ForEach(delegate(Scene scene) 84 ForEach(delegate(Scene scene) { scene.SendCommandToScripts(cmdparams); });
87 {
88 scene.SendCommandToScripts(cmdparams);
89 });
90 } 85 }
91 86
92 public void BypassPermissions(bool bypassPermissions) 87 public void BypassPermissions(bool bypassPermissions)
93 { 88 {
94 ForEach(delegate(Scene scene) 89 ForEach(delegate(Scene scene) { scene.PermissionsMngr.BypassPermissions = bypassPermissions; });
95 {
96 scene.PermissionsMngr.BypassPermissions = bypassPermissions;
97 });
98 } 90 }
99 91
100 private void ForEach(Action<Scene> func) 92 private void ForEach(Action<Scene> func)
@@ -111,18 +103,12 @@ namespace OpenSim.Region.Environment.Scenes
111 103
112 public void Backup() 104 public void Backup()
113 { 105 {
114 ForEach(delegate(Scene scene) 106 ForEach(delegate(Scene scene) { scene.Backup(); });
115 {
116 scene.Backup();
117 });
118 } 107 }
119 108
120 public void HandleAlertCommand(string[] cmdparams) 109 public void HandleAlertCommand(string[] cmdparams)
121 { 110 {
122 ForEach(delegate(Scene scene) 111 ForEach(delegate(Scene scene) { scene.HandleAlertCommand(cmdparams); });
123 {
124 scene.HandleAlertCommand(cmdparams);
125 });
126 } 112 }
127 113
128 public bool TrySetCurrentRegion(string regionName) 114 public bool TrySetCurrentRegion(string regionName)
@@ -161,8 +147,8 @@ namespace OpenSim.Region.Environment.Scenes
161 if (!scenePrescence.childAgent) 147 if (!scenePrescence.childAgent)
162 { 148 {
163 log.Error(String.Format("Packet debug for {0} {1} set to {2}", 149 log.Error(String.Format("Packet debug for {0} {1} set to {2}",
164 scenePrescence.Firstname, scenePrescence.Lastname, 150 scenePrescence.Firstname, scenePrescence.Lastname,
165 newDebug)); 151 newDebug));
166 152
167 scenePrescence.ControllingClient.SetDebug(newDebug); 153 scenePrescence.ControllingClient.SetDebug(newDebug);
168 } 154 }
@@ -219,18 +205,12 @@ namespace OpenSim.Region.Environment.Scenes
219 205
220 public void ForceClientUpdate() 206 public void ForceClientUpdate()
221 { 207 {
222 ForEach(delegate(Scene scene) 208 ForEach(delegate(Scene scene) { scene.ForceClientUpdate(); });
223 {
224 scene.ForceClientUpdate();
225 });
226 } 209 }
227 210
228 public void HandleEditCommand(string[] cmdparams) 211 public void HandleEditCommand(string[] cmdparams)
229 { 212 {
230 ForEach(delegate(Scene scene) 213 ForEach(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
231 {
232 scene.HandleEditCommand(cmdparams);
233 });
234 } 214 }
235 } 215 }
236} 216} \ No newline at end of file