diff options
author | Teravus Ovares | 2008-02-06 09:38:14 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-06 09:38:14 +0000 |
commit | 9d6ea497e27bb2c93211fe2899e609ea9ea18623 (patch) | |
tree | 930777aa2d9cf39c8ba54dc81d89771c21b969d4 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Cleaned up some unreachable code warnings. (diff) | |
download | opensim-SC_OLD-9d6ea497e27bb2c93211fe2899e609ea9ea18623.zip opensim-SC_OLD-9d6ea497e27bb2c93211fe2899e609ea9ea18623.tar.gz opensim-SC_OLD-9d6ea497e27bb2c93211fe2899e609ea9ea18623.tar.bz2 opensim-SC_OLD-9d6ea497e27bb2c93211fe2899e609ea9ea18623.tar.xz |
* Added the ability to start and stop all scripts in the simulator using the debug tab on the estate tools. This along with the disable physics via the debug tab are persistant across reboots. That means that if it's disabled when you shut down the simulator, the simulator will come up again when you start it up without loading the scripts. Turning them back on is as simple as unchecking 'disable scripts' in the debug tab of the estate tools.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d0acded..40a80c4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -283,6 +283,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | httpListener = httpServer; | 283 | httpListener = httpServer; |
284 | m_dumpAssetsToFile = dumpAssetsToFile; | 284 | m_dumpAssetsToFile = dumpAssetsToFile; |
285 | 285 | ||
286 | if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts) | ||
287 | { | ||
288 | m_scripts_enabled = false; | ||
289 | } | ||
290 | else | ||
291 | { | ||
292 | m_scripts_enabled = true; | ||
293 | } | ||
294 | if ((RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipPhysics) == Simulator.RegionFlags.SkipPhysics) | ||
295 | { | ||
296 | m_physics_enabled = false; | ||
297 | } | ||
298 | else | ||
299 | { | ||
300 | m_physics_enabled = true; | ||
301 | } | ||
302 | |||
286 | m_statsReporter = new SimStatsReporter(regInfo); | 303 | m_statsReporter = new SimStatsReporter(regInfo); |
287 | m_statsReporter.OnSendStatsResult += SendSimStatsPackets; | 304 | m_statsReporter.OnSendStatsResult += SendSimStatsPackets; |
288 | } | 305 | } |
@@ -483,6 +500,37 @@ namespace OpenSim.Region.Environment.Scenes | |||
483 | if (m_scripts_enabled != !ScriptEngine) | 500 | if (m_scripts_enabled != !ScriptEngine) |
484 | { | 501 | { |
485 | // Tedd! Here's the method to disable the scripting engine! | 502 | // Tedd! Here's the method to disable the scripting engine! |
503 | if (ScriptEngine) | ||
504 | { | ||
505 | m_log.Info("Stopping all Scripts in Scene"); | ||
506 | lock (Entities) | ||
507 | { | ||
508 | foreach (EntityBase ent in Entities.Values) | ||
509 | { | ||
510 | if (ent is SceneObjectGroup) | ||
511 | { | ||
512 | ((SceneObjectGroup)ent).StopScripts(); | ||
513 | } | ||
514 | } | ||
515 | } | ||
516 | } | ||
517 | else | ||
518 | { | ||
519 | m_log.Info("Starting all Scripts in Scene"); | ||
520 | lock (Entities) | ||
521 | { | ||
522 | foreach (EntityBase ent in Entities.Values) | ||
523 | { | ||
524 | if (ent is SceneObjectGroup) | ||
525 | { | ||
526 | ((SceneObjectGroup)ent).StartScripts(); | ||
527 | } | ||
528 | } | ||
529 | } | ||
530 | |||
531 | |||
532 | } | ||
533 | m_scripts_enabled = !ScriptEngine; | ||
486 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); | 534 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
487 | } | 535 | } |
488 | if (m_physics_enabled != !PhysicsEngine) | 536 | if (m_physics_enabled != !PhysicsEngine) |