From 3deb52d3996b45228c2301ecc7445514099f3b13 Mon Sep 17 00:00:00 2001
From: BlueWall
Date: Tue, 10 Jan 2012 13:41:35 -0500
Subject: Teleport Debugging

	Move setting from ini to existing facitilies - thanks justincc

	toggle with console command: debug teleport
---
 OpenSim/Region/Application/OpenSim.cs    | 17 +++++++++++++++++
 OpenSim/Region/Framework/Scenes/Scene.cs |  2 --
 2 files changed, 17 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Region')

diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 3a1a8c7..867e36d 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -250,6 +250,8 @@ namespace OpenSim
                                           + "If level <= 0 then no extra http logging is done.\n",
                                           Debug);
 
+            m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
+
             m_console.Commands.AddCommand("region", false, "debug scene",
                                           "debug scene <cripting> <collisions> <physics>",
                                           "Turn on scene debugging", Debug);
@@ -948,6 +950,21 @@ namespace OpenSim
 
                     break;
 
+                case "teleport":
+                    foreach(Scene s in m_sceneManager.Scenes)
+                    {
+                        if (s.DEBUG)
+                        {
+                            s.DEBUG = false;
+                            MainConsole.Instance.Output("Teleport debugging is disabled!");
+                        }
+                        else{
+                            s.DEBUG = true;
+                            MainConsole.Instance.Output("Teleport debugging is enabled!");
+                        }
+                    }
+                    break;
+
                 default:
                     MainConsole.Instance.Output("Unknown debug command");
                     break;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ed6f68a..f03c345 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -651,8 +651,6 @@ namespace OpenSim.Region.Framework.Scenes
                 //
                 IConfig startupConfig = m_config.Configs["Startup"];
 
-                DEBUG = startupConfig.GetBoolean("DEBUG", false);
-
                 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
                 m_useBackup = startupConfig.GetBoolean("UseSceneBackup", m_useBackup);
                 if (!m_useBackup)
-- 
cgit v1.1