add missing regionExtent setup and Scene physicsscene configuration ( not

exactly as core)
This commit is contained in:
UbitUmarov
2015-08-19 11:04:28 +01:00
parent 0b105da626
commit 0af2fafddf
5 changed files with 24 additions and 18 deletions

View File

@@ -138,8 +138,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, m_simDataService, m_estateDataService, configSource, null);
regInfo, m_acm, physicsScene, scs, m_simDataService, m_estateDataService, configSource, null);
INonSharedRegionModule godsModule = new GodsModule();
godsModule.Initialise(new IniConfigSource());
@@ -184,11 +191,6 @@ namespace OpenSim.Tests.Common
testScene.LandChannel = new TestLandChannel(testScene);
testScene.LoadWorldMap();
PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
testScene.PhysicsScene
= physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test");
testScene.RegionInfo.EstateSettings = new EstateSettings();
testScene.LoginsEnabled = true;
testScene.RegisterRegionWithGrid();

View File

@@ -33,16 +33,17 @@ using OpenSim.Framework.Servers;
using OpenSim.Region.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Physics.Manager;
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)
{
}