Allow the "debug scene set physics false|true" command to work when bulletsim physics is running in a separate thread.

This will also allow the "disable physics" setting in the region debug viewer dialog to work in this circumstance.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-07-29 01:21:15 +01:00
parent df816b38ac
commit 3654ae8d8c
8 changed files with 78 additions and 39 deletions

View File

@@ -151,8 +151,15 @@ namespace OpenSim.Tests.Common
SceneCommunicationService scs = new SceneCommunicationService();
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
PhysicsScene physicsScene
= physicsPluginManager.GetPhysicsScene(
"basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
TestScene testScene = new TestScene(
regInfo, m_acm, scs, SimDataService, m_estateDataService, configSource, null);
regInfo, m_acm, physicsScene, scs, SimDataService, m_estateDataService, configSource, null);
INonSharedRegionModule godsModule = new GodsModule();
godsModule.Initialise(new IniConfigSource());
@@ -195,13 +202,7 @@ namespace OpenSim.Tests.Common
testScene.SetModuleInterfaces();
testScene.LandChannel = new TestLandChannel(testScene);
testScene.LoadWorldMap();
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
Vector3 regionExtent = new Vector3( regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
testScene.PhysicsScene
= physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
testScene.LoadWorldMap();
testScene.RegionInfo.EstateSettings = new EstateSettings();
testScene.LoginsEnabled = true;

View File

@@ -33,6 +33,7 @@ using OpenSim.Framework.Servers;
using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
using OpenSim.Services.Interfaces;
namespace OpenSim.Tests.Common.Mock
@@ -40,10 +41,10 @@ namespace OpenSim.Tests.Common.Mock
public class TestScene : Scene
{
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
IConfigSource config, string simulatorVersion)
: base(regInfo, authen, sceneGridService, simDataService, estateDataService,
: base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
config, simulatorVersion)
{
}