From 3b0db66b92a9e497d965d2a26c9d6de643612b63 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 15 Dec 2008 18:39:54 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=2775 with small
tweaks * This pushes an identifier for the OpenSim scene to the physics
scene. This allows log messages from the physics scene to identify which
OpenSim scene they relate to. * Thanks Gerhard
---
.../Region/ClientStack/RegionApplicationBase.cs | 29 +++++++++++++++++++---
1 file changed, 25 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/ClientStack/RegionApplicationBase.cs')
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
protected SceneManager m_sceneManager = new SceneManager();
protected abstract void Initialize();
- protected abstract PhysicsScene GetPhysicsScene();
+
+ ///
+ /// Get a new physics scene.
+ ///
+ ///
+ ///
+ /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
+ ///
+ ///
+ protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier);
+
protected abstract StorageManager CreateStorageManager();
protected abstract ClientStackManager CreateClientStackManager();
protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
@@ -99,13 +109,24 @@ namespace OpenSim.Region.ClientStack
m_httpServer.Start();
}
- protected PhysicsScene GetPhysicsScene(string engine, string meshEngine, IConfigSource config)
+ ///
+ /// Get a new physics scene.
+ ///
+ /// The name of the physics engine to use
+ /// The name of the mesh engine to use
+ /// The configuration data to pass to the physics and mesh engines
+ ///
+ /// The name of the OpenSim scene this physics scene is serving. This will be used in log messages.
+ ///
+ ///
+ protected PhysicsScene GetPhysicsScene(
+ string engine, string meshEngine, IConfigSource config, string osSceneIdentifier)
{
PhysicsPluginManager physicsPluginManager;
physicsPluginManager = new PhysicsPluginManager();
physicsPluginManager.LoadPluginsFromAssemblies("Physics");
- return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config);
+ return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier);
}
///
@@ -153,7 +174,7 @@ namespace OpenSim.Region.ClientStack
scene.LoadWorldMap();
- scene.PhysicsScene = GetPhysicsScene();
+ scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
scene.PhysicsScene.SetWaterLevel((float)regionInfo.RegionSettings.WaterHeight);
--
cgit v1.1