aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
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/Api/Implementation/OSSL_Api.cs
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/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs15
1 files changed, 15 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