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.inv-download
parent
2a302d9a32
commit
9b337b089c
|
@ -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()
|
public string osGetPhysicsEngineType()
|
||||||
{
|
{
|
||||||
// High because it can be used to target attacks to known weaknesses
|
// High because it can be used to target attacks to known weaknesses
|
||||||
|
|
|
@ -259,6 +259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
|
|
||||||
string osGetScriptEngineName();
|
string osGetScriptEngineName();
|
||||||
string osGetSimulatorVersion();
|
string osGetSimulatorVersion();
|
||||||
|
LSL_Integer osCheckODE();
|
||||||
string osGetPhysicsEngineType();
|
string osGetPhysicsEngineType();
|
||||||
Object osParseJSONNew(string JSON);
|
Object osParseJSONNew(string JSON);
|
||||||
Hashtable osParseJSON(string JSON);
|
Hashtable osParseJSON(string JSON);
|
||||||
|
|
|
@ -420,6 +420,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
return m_OSSL_Functions.osGetScriptEngineName();
|
return m_OSSL_Functions.osGetScriptEngineName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer osCheckODE()
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osCheckODE();
|
||||||
|
}
|
||||||
|
|
||||||
public string osGetPhysicsEngineType()
|
public string osGetPhysicsEngineType()
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osGetPhysicsEngineType();
|
return m_OSSL_Functions.osGetPhysicsEngineType();
|
||||||
|
|
Loading…
Reference in New Issue