aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs24
2 files changed, 38 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index 9700e6c..edc86e5 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -216,12 +216,28 @@ namespace OpenSim.Region.Environment
216 SendEstateBlueBoxMessage(remote_client, packet); 216 SendEstateBlueBoxMessage(remote_client, packet);
217 } 217 }
218 break; 218 break;
219 case "setregiondebug":
220 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
221 {
222 SetRegionDebug(remote_client, packet);
223 }
224 break;
219 default: 225 default:
220 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); 226 MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
221 break; 227 break;
222 } 228 }
223 } 229 }
224 230
231 private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet)
232 {
233 LLUUID invoice = packet.MethodData.Invoice;
234 LLUUID SenderID = packet.AgentData.AgentID;
235 bool scripted = convertParamStringToBool(packet.ParamList[0].Parameter);
236 bool collisionEvents = convertParamStringToBool(packet.ParamList[1].Parameter);
237 bool physics = convertParamStringToBool(packet.ParamList[2].Parameter);
238 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
239 }
240
225 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet) 241 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet)
226 { 242 {
227 LLUUID invoice = packet.MethodData.Invoice; 243 LLUUID invoice = packet.MethodData.Invoice;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6defe30..464a29a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -130,6 +130,11 @@ namespace OpenSim.Region.Environment.Scenes
130 private int physicsMS = 0; 130 private int physicsMS = 0;
131 private int otherMS = 0; 131 private int otherMS = 0;
132 132
133 private bool m_physics_enabled = true;
134 private bool m_physics_collisions_enabled = true;
135 private bool m_scripts_enabled = true;
136
137
133 138
134 #endregion 139 #endregion
135 140
@@ -475,6 +480,21 @@ namespace OpenSim.Region.Environment.Scenes
475 } 480 }
476 } 481 }
477 482
483 public void SetSceneCoreDebug(bool ScriptEngine, bool CollisionEvents, bool PhysicsEngine)
484 {
485 if (m_scripts_enabled != !ScriptEngine)
486 {
487 // Tedd! Here's the method to disable the scripting engine!
488 MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine");
489 }
490 if (m_physics_enabled != !PhysicsEngine)
491 {
492 m_physics_enabled = !PhysicsEngine;
493
494 }
495
496 }
497
478 // This is the method that shuts down the scene. 498 // This is the method that shuts down the scene.
479 public override void Close() 499 public override void Close()
480 { 500 {
@@ -575,7 +595,7 @@ namespace OpenSim.Region.Environment.Scenes
575 595
576 596
577 physicsMS2 = System.Environment.TickCount; 597 physicsMS2 = System.Environment.TickCount;
578 if (m_frame%m_update_physics == 0) 598 if ((m_frame%m_update_physics == 0) && m_physics_enabled)
579 m_innerScene.UpdatePreparePhysics(); 599 m_innerScene.UpdatePreparePhysics();
580 physicsMS2 = System.Environment.TickCount - physicsMS2; 600 physicsMS2 = System.Environment.TickCount - physicsMS2;
581 601
@@ -583,7 +603,7 @@ namespace OpenSim.Region.Environment.Scenes
583 m_innerScene.UpdateEntityMovement(); 603 m_innerScene.UpdateEntityMovement();
584 604
585 physicsMS = System.Environment.TickCount; 605 physicsMS = System.Environment.TickCount;
586 if (m_frame%m_update_physics == 0) 606 if ((m_frame%m_update_physics == 0) && m_physics_enabled)
587 physicsFPS = m_innerScene.UpdatePhysics( 607 physicsFPS = m_innerScene.UpdatePhysics(
588 Math.Max(SinceLastFrame.TotalSeconds, m_timespan) 608 Math.Max(SinceLastFrame.TotalSeconds, m_timespan)
589 ); 609 );