From 7476b26ae77733ad2015b70946e42c39d56edca6 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 2 Feb 2008 17:43:21 +0000 Subject: * Added a way to temporarily disable physics using the estate tools * Added a method for Tedd to hook to in scene to disable the Scripting engine that currently says, [TOTEDD] Here is the method to trigger disabling of the scripting engine. --- OpenSim/Region/Environment/Scenes/Scene.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') 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 private int physicsMS = 0; private int otherMS = 0; + private bool m_physics_enabled = true; + private bool m_physics_collisions_enabled = true; + private bool m_scripts_enabled = true; + + #endregion @@ -475,6 +480,21 @@ namespace OpenSim.Region.Environment.Scenes } } + public void SetSceneCoreDebug(bool ScriptEngine, bool CollisionEvents, bool PhysicsEngine) + { + if (m_scripts_enabled != !ScriptEngine) + { + // Tedd! Here's the method to disable the scripting engine! + MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine"); + } + if (m_physics_enabled != !PhysicsEngine) + { + m_physics_enabled = !PhysicsEngine; + + } + + } + // This is the method that shuts down the scene. public override void Close() { @@ -575,7 +595,7 @@ namespace OpenSim.Region.Environment.Scenes physicsMS2 = System.Environment.TickCount; - if (m_frame%m_update_physics == 0) + if ((m_frame%m_update_physics == 0) && m_physics_enabled) m_innerScene.UpdatePreparePhysics(); physicsMS2 = System.Environment.TickCount - physicsMS2; @@ -583,7 +603,7 @@ namespace OpenSim.Region.Environment.Scenes m_innerScene.UpdateEntityMovement(); physicsMS = System.Environment.TickCount; - if (m_frame%m_update_physics == 0) + if ((m_frame%m_update_physics == 0) && m_physics_enabled) physicsFPS = m_innerScene.UpdatePhysics( Math.Max(SinceLastFrame.TotalSeconds, m_timespan) ); -- cgit v1.1