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.cs82
1 files changed, 41 insertions, 41 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 2325ed4..2dfea2a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -41,13 +41,10 @@ namespace OpenSim.Region.Environment.Scenes
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private readonly List<Scene> m_localScenes; 44 public event RestartSim OnRestartSim;
45 private Scene m_currentScene;
46 45
47 public SceneManager() 46 private readonly List<Scene> m_localScenes;
48 { 47 private Scene m_currentScene = null;
49 m_localScenes = new List<Scene>();
50 }
51 48
52 public List<Scene> Scenes 49 public List<Scene> Scenes
53 { 50 {
@@ -74,7 +71,10 @@ namespace OpenSim.Region.Environment.Scenes
74 } 71 }
75 } 72 }
76 73
77 public event RestartSim OnRestartSim; 74 public SceneManager()
75 {
76 m_localScenes = new List<Scene>();
77 }
78 78
79 public void Close() 79 public void Close()
80 { 80 {
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Scenes
180 [Obsolete("TODO: Remove this warning by 0.7")] 180 [Obsolete("TODO: Remove this warning by 0.7")]
181 public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result) 181 public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
182 { 182 {
183 m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands."); 183 m_log.Warn("DEPRECIATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands.");
184 return false; 184 return false;
185 } 185 }
186 186
@@ -252,8 +252,8 @@ namespace OpenSim.Region.Environment.Scenes
252 252
253 public bool TrySetCurrentScene(LLUUID regionID) 253 public bool TrySetCurrentScene(LLUUID regionID)
254 { 254 {
255 Console.WriteLine("Searching for Region: '{0}'", regionID); 255 Console.WriteLine("Searching for Region: '{0}'", regionID.ToString());
256 256
257 foreach (Scene scene in m_localScenes) 257 foreach (Scene scene in m_localScenes)
258 { 258 {
259 if (scene.RegionInfo.RegionID == regionID) 259 if (scene.RegionInfo.RegionID == regionID)
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Scenes
262 return true; 262 return true;
263 } 263 }
264 } 264 }
265 265
266 return false; 266 return false;
267 } 267 }
268 268
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes
313 { 313 {
314 foreach (Scene mscene in m_localScenes) 314 foreach (Scene mscene in m_localScenes)
315 { 315 {
316 if ((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) && 316 if((mscene.RegionInfo.InternalEndPoint.Equals(ipEndPoint.Address)) &&
317 (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)) 317 (mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port))
318 { 318 {
319 scene = mscene; 319 scene = mscene;
@@ -327,22 +327,22 @@ namespace OpenSim.Region.Environment.Scenes
327 public void SetDebugPacketOnCurrentScene(int newDebug) 327 public void SetDebugPacketOnCurrentScene(int newDebug)
328 { 328 {
329 ForEachCurrentScene(delegate(Scene scene) 329 ForEachCurrentScene(delegate(Scene scene)
330 { 330 {
331 List<ScenePresence> scenePresences = scene.GetScenePresences(); 331 List<ScenePresence> scenePresences = scene.GetScenePresences();
332 332
333 foreach (ScenePresence scenePresence in scenePresences) 333 foreach (ScenePresence scenePresence in scenePresences)
334 {
335 if (!scenePresence.IsChildAgent)
334 { 336 {
335 if (!scenePresence.IsChildAgent) 337 m_log.ErrorFormat("Packet debug for {0} {1} set to {2}",
336 { 338 scenePresence.Firstname,
337 m_log.ErrorFormat("Packet debug for {0} {1} set to {2}", 339 scenePresence.Lastname,
338 scenePresence.Firstname, 340 newDebug);
339 scenePresence.Lastname, 341
340 newDebug); 342 scenePresence.ControllingClient.SetDebug(newDebug);
341
342 scenePresence.ControllingClient.SetDebug(newDebug);
343 }
344 } 343 }
345 }); 344 }
345 });
346 } 346 }
347 347
348 public List<ScenePresence> GetCurrentSceneAvatars() 348 public List<ScenePresence> GetCurrentSceneAvatars()
@@ -350,17 +350,17 @@ namespace OpenSim.Region.Environment.Scenes
350 List<ScenePresence> avatars = new List<ScenePresence>(); 350 List<ScenePresence> avatars = new List<ScenePresence>();
351 351
352 ForEachCurrentScene(delegate(Scene scene) 352 ForEachCurrentScene(delegate(Scene scene)
353 { 353 {
354 List<ScenePresence> scenePresences = scene.GetScenePresences(); 354 List<ScenePresence> scenePresences = scene.GetScenePresences();
355 355
356 foreach (ScenePresence scenePresence in scenePresences) 356 foreach (ScenePresence scenePresence in scenePresences)
357 { 357 {
358 if (!scenePresence.IsChildAgent) 358 if (!scenePresence.IsChildAgent)
359 { 359 {
360 avatars.Add(scenePresence); 360 avatars.Add(scenePresence);
361 } 361 }
362 } 362 }
363 }); 363 });
364 364
365 return avatars; 365 return avatars;
366 } 366 }
@@ -381,11 +381,11 @@ namespace OpenSim.Region.Environment.Scenes
381 public void SetCurrentSceneTimePhase(int timePhase) 381 public void SetCurrentSceneTimePhase(int timePhase)
382 { 382 {
383 ForEachCurrentScene(delegate(Scene scene) 383 ForEachCurrentScene(delegate(Scene scene)
384 { 384 {
385 scene.SetTimePhase( 385 scene.SetTimePhase(
386 timePhase) 386 timePhase)
387 ; 387 ;
388 }); 388 });
389 } 389 }
390 390
391 public void ForceCurrentSceneClientUpdate() 391 public void ForceCurrentSceneClientUpdate()
@@ -453,4 +453,4 @@ namespace OpenSim.Region.Environment.Scenes
453 m_localScenes.ForEach(action); 453 m_localScenes.ForEach(action);
454 } 454 }
455 } 455 }
456} \ No newline at end of file 456}