diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 169efbd10c..59b6b2197e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -937,26 +937,11 @@ namespace OpenSim } else { - MainConsole.Instance.Output("Usage: debug scene scripting|collisions|physics true|false"); + MainConsole.Instance.Output("Usage: debug scene scripting|collisions|physics|teleport true|false"); } 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 f2200da257..e1e4ed5cb8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Scenes #region Fields public bool EmergencyMonitoring = false; - public bool DEBUG = false; + public bool DebugTeleporting { get; private set; } public SynchronizeSceneHandler SynchronizeScene; public SimStatsReporter StatsReporter; @@ -1064,6 +1064,9 @@ namespace OpenSim.Region.Framework.Scenes if (bool.TryParse(options["physics"], out enablePhysics) && m_physics_enabled != enablePhysics) m_physics_enabled = enablePhysics; } + + if (options.ContainsKey("teleport")) + DebugTeleporting = true; } public int GetInaccurateNeighborCount() diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 704d12d58d..cf60c698be 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3826,7 +3826,7 @@ namespace OpenSim.Region.Framework.Scenes ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); if (land != null) { - if (Scene.DEBUG) + if (Scene.DebugTeleporting) TeleportFlagsDebug(); // If we come in via login, landmark or map, we want to