diff options
author | Justin Clark-Casey (justincc) | 2012-03-21 01:02:58 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-21 01:02:58 +0000 |
commit | 9671e43497c7bc09903d0ef34a45ee9ad1665927 (patch) | |
tree | dfe025fcea5e254040093357d9d050dcc2ab32b6 /OpenSim/Region/Framework | |
parent | Refix the fixed fix! (diff) | |
download | opensim-SC_OLD-9671e43497c7bc09903d0ef34a45ee9ad1665927.zip opensim-SC_OLD-9671e43497c7bc09903d0ef34a45ee9ad1665927.tar.gz opensim-SC_OLD-9671e43497c7bc09903d0ef34a45ee9ad1665927.tar.bz2 opensim-SC_OLD-9671e43497c7bc09903d0ef34a45ee9ad1665927.tar.xz |
Replace "scene debug true false true" console command with "scene debug scripting true" or other parameters as appropriate.
This is to allow individual switching of scene debug settings and to provide flexibiltiy for additional settings.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 790ec63..f2200da 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1020,44 +1020,49 @@ namespace OpenSim.Region.Framework.Scenes | |||
1020 | } | 1020 | } |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | public void SetSceneCoreDebug(bool ScriptEngine, bool CollisionEvents, bool PhysicsEngine) | 1023 | public void SetSceneCoreDebug(Dictionary<string, string> options) |
1024 | { | 1024 | { |
1025 | if (m_scripts_enabled != !ScriptEngine) | 1025 | if (options.ContainsKey("scripting")) |
1026 | { | 1026 | { |
1027 | if (ScriptEngine) | 1027 | bool enableScripts = true; |
1028 | if (bool.TryParse(options["scripting"], out enableScripts) && m_scripts_enabled != enableScripts) | ||
1028 | { | 1029 | { |
1029 | m_log.Info("Stopping all Scripts in Scene"); | 1030 | if (!enableScripts) |
1030 | |||
1031 | EntityBase[] entities = Entities.GetEntities(); | ||
1032 | foreach (EntityBase ent in entities) | ||
1033 | { | 1031 | { |
1034 | if (ent is SceneObjectGroup) | 1032 | m_log.Info("Stopping all Scripts in Scene"); |
1035 | ((SceneObjectGroup)ent).RemoveScriptInstances(false); | 1033 | |
1034 | EntityBase[] entities = Entities.GetEntities(); | ||
1035 | foreach (EntityBase ent in entities) | ||
1036 | { | ||
1037 | if (ent is SceneObjectGroup) | ||
1038 | ((SceneObjectGroup)ent).RemoveScriptInstances(false); | ||
1039 | } | ||
1036 | } | 1040 | } |
1037 | } | 1041 | else |
1038 | else | ||
1039 | { | ||
1040 | m_log.Info("Starting all Scripts in Scene"); | ||
1041 | |||
1042 | EntityBase[] entities = Entities.GetEntities(); | ||
1043 | foreach (EntityBase ent in entities) | ||
1044 | { | 1042 | { |
1045 | if (ent is SceneObjectGroup) | 1043 | m_log.Info("Starting all Scripts in Scene"); |
1044 | |||
1045 | EntityBase[] entities = Entities.GetEntities(); | ||
1046 | foreach (EntityBase ent in entities) | ||
1046 | { | 1047 | { |
1047 | SceneObjectGroup sog = (SceneObjectGroup)ent; | 1048 | if (ent is SceneObjectGroup) |
1048 | sog.CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 1049 | { |
1049 | sog.ResumeScripts(); | 1050 | SceneObjectGroup sog = (SceneObjectGroup)ent; |
1051 | sog.CreateScriptInstances(0, false, DefaultScriptEngine, 0); | ||
1052 | sog.ResumeScripts(); | ||
1053 | } | ||
1050 | } | 1054 | } |
1051 | } | 1055 | } |
1052 | } | ||
1053 | 1056 | ||
1054 | m_scripts_enabled = !ScriptEngine; | 1057 | m_scripts_enabled = enableScripts; |
1055 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); | 1058 | } |
1056 | } | 1059 | } |
1057 | 1060 | ||
1058 | if (m_physics_enabled != !PhysicsEngine) | 1061 | if (options.ContainsKey("physics")) |
1059 | { | 1062 | { |
1060 | m_physics_enabled = !PhysicsEngine; | 1063 | bool enablePhysics = false; |
1064 | if (bool.TryParse(options["physics"], out enablePhysics) && m_physics_enabled != enablePhysics) | ||
1065 | m_physics_enabled = enablePhysics; | ||
1061 | } | 1066 | } |
1062 | } | 1067 | } |
1063 | 1068 | ||