From 3654ae8d8cea0bf0455974efe18ff99e484d2893 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jul 2014 01:21:15 +0100 Subject: 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. --- OpenSim/Tests/Common/Helpers/SceneHelpers.cs | 17 +++++++++-------- OpenSim/Tests/Common/Mock/TestScene.cs | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'OpenSim/Tests') diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs index 342cd06..ae2be70 100644 --- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs @@ -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; diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 2773624..40e2adc 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs @@ -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) { } -- cgit v1.1