diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/RegionApplicationBase.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index ce978df..cc3edff 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -71,7 +71,17 @@ namespace OpenSim.Region.ClientStack | |||
71 | protected SceneManager m_sceneManager = new SceneManager(); | 71 | protected SceneManager m_sceneManager = new SceneManager(); |
72 | 72 | ||
73 | protected abstract void Initialize(); | 73 | protected abstract void Initialize(); |
74 | protected abstract PhysicsScene GetPhysicsScene(); | 74 | |
75 | /// <summary> | ||
76 | /// Get a new physics scene. | ||
77 | /// </summary> | ||
78 | /// | ||
79 | /// <param name="osSceneIdentifier"> | ||
80 | /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. | ||
81 | /// </param> | ||
82 | /// <returns></returns> | ||
83 | protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); | ||
84 | |||
75 | protected abstract StorageManager CreateStorageManager(); | 85 | protected abstract StorageManager CreateStorageManager(); |
76 | protected abstract ClientStackManager CreateClientStackManager(); | 86 | protected abstract ClientStackManager CreateClientStackManager(); |
77 | protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 87 | protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
@@ -99,13 +109,24 @@ namespace OpenSim.Region.ClientStack | |||
99 | m_httpServer.Start(); | 109 | m_httpServer.Start(); |
100 | } | 110 | } |
101 | 111 | ||
102 | protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config) | 112 | /// <summary> |
113 | /// Get a new physics scene. | ||
114 | /// </summary> | ||
115 | /// <param name="engine">The name of the physics engine to use</param> | ||
116 | /// <param name="meshEngine">The name of the mesh engine to use</param> | ||
117 | /// <param name="config">The configuration data to pass to the physics and mesh engines</param> | ||
118 | /// <param name="osSceneIdentifier"> | ||
119 | /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages. | ||
120 | /// </param> | ||
121 | /// <returns></returns> | ||
122 | protected PhysicsScene GetPhysicsScene( | ||
123 | string engine, string meshEngine, IConfigSource config, string osSceneIdentifier) | ||
103 | { | 124 | { |
104 | PhysicsPluginManager physicsPluginManager; | 125 | PhysicsPluginManager physicsPluginManager; |
105 | physicsPluginManager = new PhysicsPluginManager(); | 126 | physicsPluginManager = new PhysicsPluginManager(); |
106 | physicsPluginManager.LoadPluginsFromAssemblies("Physics"); | 127 | physicsPluginManager.LoadPluginsFromAssemblies("Physics"); |
107 | 128 | ||
108 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config); | 129 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); |
109 | } | 130 | } |
110 | 131 | ||
111 | /// <summary> | 132 | /// <summary> |
@@ -153,7 +174,7 @@ namespace OpenSim.Region.ClientStack | |||
153 | 174 | ||
154 | scene.LoadWorldMap(); | 175 | scene.LoadWorldMap(); |
155 | 176 | ||
156 | scene.PhysicsScene = GetPhysicsScene(); | 177 | scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName); |
157 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); | 178 | scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised()); |
158 | scene.PhysicsScene.SetWaterLevel((float)regionInfo.RegionSettings.WaterHeight); | 179 | scene.PhysicsScene.SetWaterLevel((float)regionInfo.RegionSettings.WaterHeight); |
159 | 180 | ||