aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2015-08-19 11:04:28 +0100
committerUbitUmarov2015-08-19 11:04:28 +0100
commit0af2fafddf36009ffe470da106dc6d0ceb3ced10 (patch)
treec5d2a58398fcc4bd1b4722a8379ce9bb643fe8e5 /OpenSim/Region
parentMerge branch 'mbworkvar2' into ubitvar (diff)
downloadopensim-SC_OLD-0af2fafddf36009ffe470da106dc6d0ceb3ced10.zip
opensim-SC_OLD-0af2fafddf36009ffe470da106dc6d0ceb3ced10.tar.gz
opensim-SC_OLD-0af2fafddf36009ffe470da106dc6d0ceb3ced10.tar.bz2
opensim-SC_OLD-0af2fafddf36009ffe470da106dc6d0ceb3ced10.tar.xz
add missing regionExtent setup and Scene physicsscene configuration ( not
exactly as core)
Diffstat (limited to 'OpenSim/Region')
-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
3 files changed, 13 insertions, 10 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;