diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
3 files changed, 22 insertions, 0 deletions
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(); |