aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs27
1 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 1e2e973..780bd01 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -331,35 +331,30 @@ namespace OpenSim.Region.Framework.Scenes
331 331
332 public void SendCommandToPluginModules(string[] cmdparams) 332 public void SendCommandToPluginModules(string[] cmdparams)
333 { 333 {
334 ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); }); 334 ForEachSelectedScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
335 } 335 }
336 336
337 public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions) 337 public void SetBypassPermissionsOnCurrentScene(bool bypassPermissions)
338 { 338 {
339 ForEachCurrentScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); }); 339 ForEachSelectedScene(delegate(Scene scene) { scene.Permissions.SetBypassPermissions(bypassPermissions); });
340 } 340 }
341 341
342 private void ForEachCurrentScene(Action<Scene> func) 342 public void ForEachSelectedScene(Action<Scene> func)
343 { 343 {
344 if (CurrentScene == null) 344 if (CurrentScene == null)
345 { 345 ForEachScene(func);
346 lock (m_localScenes)
347 m_localScenes.ForEach(func);
348 }
349 else 346 else
350 {
351 func(CurrentScene); 347 func(CurrentScene);
352 }
353 } 348 }
354 349
355 public void RestartCurrentScene() 350 public void RestartCurrentScene()
356 { 351 {
357 ForEachCurrentScene(delegate(Scene scene) { scene.RestartNow(); }); 352 ForEachSelectedScene(delegate(Scene scene) { scene.RestartNow(); });
358 } 353 }
359 354
360 public void BackupCurrentScene() 355 public void BackupCurrentScene()
361 { 356 {
362 ForEachCurrentScene(delegate(Scene scene) { scene.Backup(true); }); 357 ForEachSelectedScene(delegate(Scene scene) { scene.Backup(true); });
363 } 358 }
364 359
365 public bool TrySetCurrentScene(string regionName) 360 public bool TrySetCurrentScene(string regionName)
@@ -490,7 +485,7 @@ namespace OpenSim.Region.Framework.Scenes
490 /// <param name="name">Name of avatar to debug</param> 485 /// <param name="name">Name of avatar to debug</param>
491 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) 486 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
492 { 487 {
493 ForEachCurrentScene(scene => 488 ForEachSelectedScene(scene =>
494 scene.ForEachScenePresence(sp => 489 scene.ForEachScenePresence(sp =>
495 { 490 {
496 if (name == null || sp.Name == name) 491 if (name == null || sp.Name == name)
@@ -509,7 +504,7 @@ namespace OpenSim.Region.Framework.Scenes
509 { 504 {
510 List<ScenePresence> avatars = new List<ScenePresence>(); 505 List<ScenePresence> avatars = new List<ScenePresence>();
511 506
512 ForEachCurrentScene( 507 ForEachSelectedScene(
513 delegate(Scene scene) 508 delegate(Scene scene)
514 { 509 {
515 scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) 510 scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence)
@@ -526,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes
526 { 521 {
527 List<ScenePresence> presences = new List<ScenePresence>(); 522 List<ScenePresence> presences = new List<ScenePresence>();
528 523
529 ForEachCurrentScene(delegate(Scene scene) 524 ForEachSelectedScene(delegate(Scene scene)
530 { 525 {
531 scene.ForEachScenePresence(delegate(ScenePresence sp) 526 scene.ForEachScenePresence(delegate(ScenePresence sp)
532 { 527 {
@@ -555,12 +550,12 @@ namespace OpenSim.Region.Framework.Scenes
555 550
556 public void ForceCurrentSceneClientUpdate() 551 public void ForceCurrentSceneClientUpdate()
557 { 552 {
558 ForEachCurrentScene(delegate(Scene scene) { scene.ForceClientUpdate(); }); 553 ForEachSelectedScene(delegate(Scene scene) { scene.ForceClientUpdate(); });
559 } 554 }
560 555
561 public void HandleEditCommandOnCurrentScene(string[] cmdparams) 556 public void HandleEditCommandOnCurrentScene(string[] cmdparams)
562 { 557 {
563 ForEachCurrentScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); }); 558 ForEachSelectedScene(delegate(Scene scene) { scene.HandleEditCommand(cmdparams); });
564 } 559 }
565 560
566 public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar) 561 public bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar)