aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs48
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs10
2 files changed, 55 insertions, 3 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)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 1e99079..6bd0575 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -88,10 +88,14 @@ namespace OpenSim.Region.Environment.Scenes
88 /// </summary> 88 /// </summary>
89 public void StartScripts() 89 public void StartScripts()
90 { 90 {
91 foreach (SceneObjectPart part in m_parts.Values) 91 // Don't start scripts if they're turned off in the region!
92 if (!((m_scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts))
92 { 93 {
93 part.StartScripts(); 94 foreach (SceneObjectPart part in m_parts.Values)
94 } 95 {
96 part.StartScripts();
97 }
98 }
95 } 99 }
96 100
97 public void StopScripts() 101 public void StopScripts()