aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs9
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
-rw-r--r--OpenSim/Tests/Common/Helpers/SceneHelpers.cs14
-rw-r--r--OpenSim/Tests/Common/Mock/TestScene.cs5
5 files changed, 24 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index f663c77..e8cf7cc 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -767,7 +767,6 @@ namespace OpenSim
767 clientServer = clientNetworkServers; 767 clientServer = clientNetworkServers;
768 scene.LoadWorldMap(); 768 scene.LoadWorldMap();
769 769
770 scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
771 scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset; 770 scene.PhysicsScene.RequestAssetMethod = scene.PhysicsRequestAsset;
772 scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); 771 scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
773 scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight); 772 scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
@@ -783,10 +782,12 @@ namespace OpenSim
783 protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, 782 protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
784 IEstateDataService estateDataService, AgentCircuitManager circuitManager) 783 IEstateDataService estateDataService, AgentCircuitManager circuitManager)
785 { 784 {
785 Vector3 regionExtent = new Vector3(regionInfo.RegionSizeX, regionInfo.RegionSizeY, regionInfo.RegionSizeZ);
786 PhysicsScene physicsScene = GetPhysicsScene(regionInfo.RegionName, regionExtent);
786 SceneCommunicationService sceneGridService = new SceneCommunicationService(); 787 SceneCommunicationService sceneGridService = new SceneCommunicationService();
787 788
788 return new Scene( 789 return new Scene(
789 regionInfo, circuitManager, sceneGridService, 790 regionInfo, circuitManager, physicsScene, sceneGridService,
790 simDataService, estateDataService, 791 simDataService, estateDataService,
791 Config, m_version); 792 Config, m_version);
792 } 793 }
@@ -829,10 +830,10 @@ namespace OpenSim
829 830
830 # region Setup methods 831 # region Setup methods
831 832
832 protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier) 833 protected override PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent)
833 { 834 {
834 return GetPhysicsScene( 835 return GetPhysicsScene(
835 m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier); 836 m_configSettings.PhysicsEngine, m_configSettings.MeshEngineName, Config, osSceneIdentifier, regionExtent);
836 } 837 }
837 838
838 /// <summary> 839 /// <summary>
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 287c278..982646e 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ClientStack
69 /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. 69 /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
70 /// </param> 70 /// </param>
71 /// <returns></returns> 71 /// <returns></returns>
72 protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); 72 protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier, Vector3 regionExtent);
73 73
74 protected abstract ClientStackManager CreateClientStackManager(); 74 protected abstract ClientStackManager CreateClientStackManager();
75 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); 75 protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);
@@ -135,13 +135,13 @@ namespace OpenSim.Region.ClientStack
135 /// </param> 135 /// </param>
136 /// <returns></returns> 136 /// <returns></returns>
137 protected PhysicsScene GetPhysicsScene( 137 protected PhysicsScene GetPhysicsScene(
138 string engine, string meshEngine, IConfigSource config, string osSceneIdentifier) 138 string engine, string meshEngine, IConfigSource config, string osSceneIdentifier, Vector3 regionExtent)
139 { 139 {
140 PhysicsPluginManager physicsPluginManager; 140 PhysicsPluginManager physicsPluginManager;
141 physicsPluginManager = new PhysicsPluginManager(); 141 physicsPluginManager = new PhysicsPluginManager();
142 physicsPluginManager.LoadPluginsFromAssemblies("Physics"); 142 physicsPluginManager.LoadPluginsFromAssemblies("Physics");
143 143
144 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); 144 return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier, regionExtent);
145 } 145 }
146 } 146 }
147} 147}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 46c9048..fa5d021 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -760,7 +760,7 @@ namespace OpenSim.Region.Framework.Scenes
760 760
761 #region Constructors 761 #region Constructors
762 762
763 public Scene(RegionInfo regInfo, AgentCircuitManager authen, 763 public Scene(RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
764 SceneCommunicationService sceneGridService, 764 SceneCommunicationService sceneGridService,
765 ISimulationDataService simDataService, IEstateDataService estateDataService, 765 ISimulationDataService simDataService, IEstateDataService estateDataService,
766 IConfigSource config, string simulatorVersion) 766 IConfigSource config, string simulatorVersion)
@@ -840,6 +840,7 @@ namespace OpenSim.Region.Framework.Scenes
840 new EventManager.LandObjectRemoved(simDataService.RemoveLandObject); 840 new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
841 841
842 m_sceneGraph = new SceneGraph(this); 842 m_sceneGraph = new SceneGraph(this);
843 m_sceneGraph.PhysicsScene = physicsScene;
843 844
844 // If the scene graph has an Unrecoverable error, restart this sim. 845 // If the scene graph has an Unrecoverable error, restart this sim.
845 // Currently the only thing that causes it to happen is two kinds of specific 846 // Currently the only thing that causes it to happen is two kinds of specific
@@ -1075,7 +1076,8 @@ namespace OpenSim.Region.Framework.Scenes
1075 { 1076 {
1076 PhysicalPrims = true; 1077 PhysicalPrims = true;
1077 CollidablePrims = true; 1078 CollidablePrims = true;
1078 PhysicsEnabled = true; 1079 // this is done above acording to config
1080 // PhysicsEnabled = true;
1079 1081
1080 PeriodicBackup = true; 1082 PeriodicBackup = true;
1081 UseBackup = true; 1083 UseBackup = true;
diff --git a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
index 4cdfe98..d36e42e 100644
--- a/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
+++ b/OpenSim/Tests/Common/Helpers/SceneHelpers.cs
@@ -138,8 +138,15 @@ namespace OpenSim.Tests.Common
138 138
139 SceneCommunicationService scs = new SceneCommunicationService(); 139 SceneCommunicationService scs = new SceneCommunicationService();
140 140
141 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
142 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
143 Vector3 regionExtent = new Vector3(regInfo.RegionSizeX, regInfo.RegionSizeY, regInfo.RegionSizeZ);
144 PhysicsScene physicsScene
145 = physicsPluginManager.GetPhysicsScene(
146 "basicphysics", "ZeroMesher", new IniConfigSource(), "test", regionExtent);
147
141 TestScene testScene = new TestScene( 148 TestScene testScene = new TestScene(
142 regInfo, m_acm, scs, m_simDataService, m_estateDataService, configSource, null); 149 regInfo, m_acm, physicsScene, scs, m_simDataService, m_estateDataService, configSource, null);
143 150
144 INonSharedRegionModule godsModule = new GodsModule(); 151 INonSharedRegionModule godsModule = new GodsModule();
145 godsModule.Initialise(new IniConfigSource()); 152 godsModule.Initialise(new IniConfigSource());
@@ -184,11 +191,6 @@ namespace OpenSim.Tests.Common
184 testScene.LandChannel = new TestLandChannel(testScene); 191 testScene.LandChannel = new TestLandChannel(testScene);
185 testScene.LoadWorldMap(); 192 testScene.LoadWorldMap();
186 193
187 PhysicsPluginManager physicsPluginManager = new PhysicsPluginManager();
188 physicsPluginManager.LoadPluginsFromAssembly("Physics/OpenSim.Region.Physics.BasicPhysicsPlugin.dll");
189 testScene.PhysicsScene
190 = physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test");
191
192 testScene.RegionInfo.EstateSettings = new EstateSettings(); 194 testScene.RegionInfo.EstateSettings = new EstateSettings();
193 testScene.LoginsEnabled = true; 195 testScene.LoginsEnabled = true;
194 testScene.RegisterRegionWithGrid(); 196 testScene.RegisterRegionWithGrid();
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs
index a7e0dfb..53a311e 100644
--- a/OpenSim/Tests/Common/Mock/TestScene.cs
+++ b/OpenSim/Tests/Common/Mock/TestScene.cs
@@ -33,16 +33,17 @@ using OpenSim.Framework.Servers;
33using OpenSim.Region.Framework; 33using OpenSim.Region.Framework;
34using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
35using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
36using OpenSim.Region.Physics.Manager;
36 37
37namespace OpenSim.Tests.Common.Mock 38namespace OpenSim.Tests.Common.Mock
38{ 39{
39 public class TestScene : Scene 40 public class TestScene : Scene
40 { 41 {
41 public TestScene( 42 public TestScene(
42 RegionInfo regInfo, AgentCircuitManager authen, 43 RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
43 SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, 44 SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
44 IConfigSource config, string simulatorVersion) 45 IConfigSource config, string simulatorVersion)
45 : base(regInfo, authen, sceneGridService, simDataService, estateDataService, 46 : base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
46 config, simulatorVersion) 47 config, simulatorVersion)
47 { 48 {
48 } 49 }