diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 24 |
1 files changed, 22 insertions, 2 deletions
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 | ); |