aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs7
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
6 files changed, 33 insertions, 4 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
index 8623891..65d8867 100644
--- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
+++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsScene.cs
@@ -112,6 +112,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
112 /// </summary> 112 /// </summary>
113 public string EngineType { get; protected set; } 113 public string EngineType { get; protected set; }
114 114
115 public string EngineName { get; protected set; }
116
115 // The only thing that should register for this event is the SceneGraph 117 // The only thing that should register for this event is the SceneGraph
116 // Anything else could cause problems. 118 // Anything else could cause problems.
117 public event physicsCrash OnPhysicsCrash; 119 public event physicsCrash OnPhysicsCrash;
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
index dd1c0ab..51b8e4e 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEModule.cs
@@ -29,6 +29,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
29 get { return "ubODE"; } 29 get { return "ubODE"; }
30 } 30 }
31 31
32 public string Version
33 {
34 get { return "1.0"; }
35 }
36
32 public Type ReplaceableInterface 37 public Type ReplaceableInterface
33 { 38 {
34 get { return null; } 39 get { return null; }
@@ -75,7 +80,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
75 80
76 if(m_scenes.ContainsKey(scene)) // ??? 81 if(m_scenes.ContainsKey(scene)) // ???
77 return; 82 return;
78 ODEScene newodescene = new ODEScene(scene, m_config, Name, OSOdeLib); 83 ODEScene newodescene = new ODEScene(scene, m_config, Name, Version, OSOdeLib);
79 m_scenes[scene] = newodescene; 84 m_scenes[scene] = newodescene;
80 } 85 }
81 86
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
index aec7ec3..e0644e3 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs
@@ -324,13 +324,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde
324 324
325 IConfig physicsconfig = null; 325 IConfig physicsconfig = null;
326 326
327 public ODEScene(Scene pscene, IConfigSource psourceconfig, string pname, bool pOSOdeLib) 327 public ODEScene(Scene pscene, IConfigSource psourceconfig, string pname, string pversion, bool pOSOdeLib)
328 { 328 {
329 OdeLock = new Object(); 329 OdeLock = new Object();
330 330
331 EngineType = pname; 331 EngineType = pname;
332 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName; 332 PhysicsSceneName = EngineType + "/" + pscene.RegionInfo.RegionName;
333 333 EngineName = pname + " " + pversion;
334 m_config = psourceconfig; 334 m_config = psourceconfig;
335 m_OSOdeLib = pOSOdeLib; 335 m_OSOdeLib = pOSOdeLib;
336 336
@@ -355,7 +355,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
355 m_log.ErrorFormat("[ubOde] No mesher. module disabled"); 355 m_log.ErrorFormat("[ubOde] No mesher. module disabled");
356 return; 356 return;
357 } 357 }
358 358
359 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig); 359 m_meshWorker = new ODEMeshWorker(this, m_log, mesher, physicsconfig);
360 m_frameWorkScene.PhysicsEnabled = true; 360 m_frameWorkScene.PhysicsEnabled = true;
361 } 361 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 90b7494..204f73e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1724,6 +1724,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1724 return ret; 1724 return ret;
1725 } 1725 }
1726 1726
1727 public string osGetPhysicsEngineName()
1728 {
1729 // not doing security checks
1730 // this whould limit the use of this
1731
1732 m_host.AddScriptLPS(1);
1733 string ret = "NoEngine";
1734 if (m_ScriptEngine.World.PhysicsScene != null)
1735 {
1736 ret = m_ScriptEngine.World.PhysicsScene.EngineName;
1737 // An old physics engine might have an uninitialized engine type
1738 if (ret == null)
1739 ret = "UnknownEngine";
1740 }
1741 return ret;
1742 }
1727 public string osGetSimulatorVersion() 1743 public string osGetSimulatorVersion()
1728 { 1744 {
1729 // High because it can be used to target attacks to known weaknesses 1745 // High because it can be used to target attacks to known weaknesses
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index e1bb139..c1a177a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -262,6 +262,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
262 string osGetSimulatorVersion(); 262 string osGetSimulatorVersion();
263 LSL_Integer osCheckODE(); 263 LSL_Integer osCheckODE();
264 string osGetPhysicsEngineType(); 264 string osGetPhysicsEngineType();
265 string osGetPhysicsEngineName();
265 Object osParseJSONNew(string JSON); 266 Object osParseJSONNew(string JSON);
266 Hashtable osParseJSON(string JSON); 267 Hashtable osParseJSON(string JSON);
267 268
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 0022020..d586290 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -435,6 +435,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
435 return m_OSSL_Functions.osGetPhysicsEngineType(); 435 return m_OSSL_Functions.osGetPhysicsEngineType();
436 } 436 }
437 437
438 public string osGetPhysicsEngineName()
439 {
440 return m_OSSL_Functions.osGetPhysicsEngineName();
441 }
442
438 public string osGetSimulatorVersion() 443 public string osGetSimulatorVersion()
439 { 444 {
440 return m_OSSL_Functions.osGetSimulatorVersion(); 445 return m_OSSL_Functions.osGetSimulatorVersion();