mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
add OSSL osGetPhysicsEngineName(). this returns a string with name and version. does no permition checks or it whould be less usefull ( only ubOde returns value)
This commit is contained in:
@@ -1724,6 +1724,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string osGetPhysicsEngineName()
|
||||
{
|
||||
// not doing security checks
|
||||
// this whould limit the use of this
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
string ret = "NoEngine";
|
||||
if (m_ScriptEngine.World.PhysicsScene != null)
|
||||
{
|
||||
ret = m_ScriptEngine.World.PhysicsScene.EngineName;
|
||||
// An old physics engine might have an uninitialized engine type
|
||||
if (ret == null)
|
||||
ret = "UnknownEngine";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
public string osGetSimulatorVersion()
|
||||
{
|
||||
// High because it can be used to target attacks to known weaknesses
|
||||
|
||||
@@ -262,6 +262,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
string osGetSimulatorVersion();
|
||||
LSL_Integer osCheckODE();
|
||||
string osGetPhysicsEngineType();
|
||||
string osGetPhysicsEngineName();
|
||||
Object osParseJSONNew(string JSON);
|
||||
Hashtable osParseJSON(string JSON);
|
||||
|
||||
|
||||
@@ -435,6 +435,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osGetPhysicsEngineType();
|
||||
}
|
||||
|
||||
public string osGetPhysicsEngineName()
|
||||
{
|
||||
return m_OSSL_Functions.osGetPhysicsEngineName();
|
||||
}
|
||||
|
||||
public string osGetSimulatorVersion()
|
||||
{
|
||||
return m_OSSL_Functions.osGetSimulatorVersion();
|
||||
|
||||
Reference in New Issue
Block a user