aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorRobert Adams2015-04-12 19:30:55 -0700
committerRobert Adams2015-04-12 19:30:55 -0700
commit9b337b089c1811e316c7d4cba04cc434f16c950c (patch)
tree6659b92bb262f235a081ab9aeb070f714de39256 /OpenSim/Region/ScriptEngine/Shared
parentMove osslEnable.ini file from bin/ to bin/config-include. (diff)
downloadopensim-SC-9b337b089c1811e316c7d4cba04cc434f16c950c.zip
opensim-SC-9b337b089c1811e316c7d4cba04cc434f16c950c.tar.gz
opensim-SC-9b337b089c1811e316c7d4cba04cc434f16c950c.tar.bz2
opensim-SC-9b337b089c1811e316c7d4cba04cc434f16c950c.tar.xz
Add osCheckODE() function so scripts can configure for running with legacy physics engine.
Function returns 'true' of the physics engine is configured to be 'OpenDynamicsEngine'. The presumption is that all other physics engines work the same (like SL) or it is a bug. Does not require ossl functions to be enabled.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 21 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 a757da1..7ecaf55 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1627,6 +1627,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1627 } 1627 }
1628 } 1628 }
1629 1629
1630 public LSL_Integer osCheckODE()
1631 {
1632 m_host.AddScriptLPS(1);
1633 LSL_Integer ret = 0; // false
1634 if (m_ScriptEngine.World.PhysicsScene != null)
1635 {
1636 string physEngine = m_ScriptEngine.World.PhysicsScene.EngineType;
1637 if (physEngine == "OpenDynamicsEngine")
1638 {
1639 ret = 1; // true
1640 }
1641 }
1642 return ret;
1643 }
1644
1630 public string osGetPhysicsEngineType() 1645 public string osGetPhysicsEngineType()
1631 { 1646 {
1632 // High because it can be used to target attacks to known weaknesses 1647 // 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 38d4574..b903667 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -259,6 +259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
259 259
260 string osGetScriptEngineName(); 260 string osGetScriptEngineName();
261 string osGetSimulatorVersion(); 261 string osGetSimulatorVersion();
262 LSL_Integer osCheckODE();
262 string osGetPhysicsEngineType(); 263 string osGetPhysicsEngineType();
263 Object osParseJSONNew(string JSON); 264 Object osParseJSONNew(string JSON);
264 Hashtable osParseJSON(string JSON); 265 Hashtable osParseJSON(string JSON);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 352a35d..6030325 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -420,6 +420,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
420 return m_OSSL_Functions.osGetScriptEngineName(); 420 return m_OSSL_Functions.osGetScriptEngineName();
421 } 421 }
422 422
423 public LSL_Integer osCheckODE()
424 {
425 return m_OSSL_Functions.osCheckODE();
426 }
427
423 public string osGetPhysicsEngineType() 428 public string osGetPhysicsEngineType()
424 { 429 {
425 return m_OSSL_Functions.osGetPhysicsEngineType(); 430 return m_OSSL_Functions.osGetPhysicsEngineType();