* 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.ThreadPoolClientBranch
parent
281245f433
commit
7476b26ae7
|
@ -216,12 +216,28 @@ namespace OpenSim.Region.Environment
|
|||
SendEstateBlueBoxMessage(remote_client, packet);
|
||||
}
|
||||
break;
|
||||
case "setregiondebug":
|
||||
if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
|
||||
{
|
||||
SetRegionDebug(remote_client, packet);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetRegionDebug(IClientAPI remote_client, EstateOwnerMessagePacket packet)
|
||||
{
|
||||
LLUUID invoice = packet.MethodData.Invoice;
|
||||
LLUUID SenderID = packet.AgentData.AgentID;
|
||||
bool scripted = convertParamStringToBool(packet.ParamList[0].Parameter);
|
||||
bool collisionEvents = convertParamStringToBool(packet.ParamList[1].Parameter);
|
||||
bool physics = convertParamStringToBool(packet.ParamList[2].Parameter);
|
||||
m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
|
||||
}
|
||||
|
||||
private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet)
|
||||
{
|
||||
LLUUID invoice = packet.MethodData.Invoice;
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue