mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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.
This commit is contained in:
@@ -1627,6 +1627,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_Integer osCheckODE()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
LSL_Integer ret = 0; // false
|
||||
if (m_ScriptEngine.World.PhysicsScene != null)
|
||||
{
|
||||
string physEngine = m_ScriptEngine.World.PhysicsScene.EngineType;
|
||||
if (physEngine == "OpenDynamicsEngine")
|
||||
{
|
||||
ret = 1; // true
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string osGetPhysicsEngineType()
|
||||
{
|
||||
// High because it can be used to target attacks to known weaknesses
|
||||
|
||||
Reference in New Issue
Block a user