From eacc2561d14dbe9cba6966e3b32bfd776e044f8a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 10 Jan 2013 17:03:19 -0800 Subject: BulletSim: add osGetPhysicsEngineType() LSL function and update the physics engines to return the name that is specified in the INI file ("physics = XXX") as the type of engine. This os function is a little different than the others in that it does not throw an exception of one is not privilaged to use it. It merely returns an empty string. --- OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs | 2 +- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs index 65be52a..9442854 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPlugin.cs @@ -59,7 +59,7 @@ public class BSPlugin : IPhysicsPlugin { if (_mScene == null) { - _mScene = new BSScene(sceneIdentifier); + _mScene = new BSScene(GetName(), sceneIdentifier); } return (_mScene); } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 4a6cebd..a5bdc07 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -167,11 +167,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters public bool VehiclePhysicalLoggingEnabled { get; private set; } #region Construction and Initialization - public BSScene(string identifier) + public BSScene(string engineType, string identifier) { m_initialized = false; - // we are passed the name of the region we're working for. + + // The name of the region we're working for is passed to us. Keep for identification. RegionName = identifier; + + // Set identifying variables in the PhysicsScene interface. + EngineType = engineType; + Name = EngineType + "/" + RegionName; } public override void Initialise(IMesher meshmerizer, IConfigSource config) -- cgit v1.1