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 --- OpenSim/Region/Physics/OdePlugin/ODETestClass.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs index 606134a..c913639 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.Physics.OdePlugin // Loading Zero Mesher imp = new ZeroMesherPlugin(); // Getting Physics Scene - ps = cbt.GetScene(); + ps = cbt.GetScene("test"); // Initializing Physics Scene. ps.Initialise(imp.GetMesher(),null); float[] _heightmap = new float[256 * 256]; diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index b066d0c..d1a3ce7 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -66,7 +66,7 @@ namespace OpenSim.Region.Physics.OdePlugin return true; } - public PhysicsScene GetScene() + public PhysicsScene GetScene(String sceneIdentifier) { if (_mScene == null) { @@ -74,7 +74,7 @@ namespace OpenSim.Region.Physics.OdePlugin // http://opensimulator.org/mantis/view.php?id=2750). d.InitODE(); - _mScene = new OdeScene(ode); + _mScene = new OdeScene(ode, sceneIdentifier); } return (_mScene); } @@ -123,7 +123,7 @@ namespace OpenSim.Region.Physics.OdePlugin public class OdeScene : PhysicsScene { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log; // private Dictionary m_storedCollisions = new Dictionary(); CollisionLocker ode; @@ -270,8 +270,11 @@ namespace OpenSim.Region.Physics.OdePlugin /// Sets many properties that ODE requires to be stable /// These settings need to be tweaked 'exactly' right or weird stuff happens. /// - public OdeScene(CollisionLocker dode) - { + public OdeScene(CollisionLocker dode, string sceneIdentifier) + { + m_log + = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier); + OdeLock = new Object(); ode = dode; nearCallback = near; -- cgit v1.1