OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osGetPhysicsEngineType C# (CSharp) Method

osGetPhysicsEngineType() public method

public osGetPhysicsEngineType ( ) : string
return string
        public string osGetPhysicsEngineType()
        {
            // High because it can be used to target attacks to known weaknesses
            // This would allow a new class of griefer scripts that don't even
            // require their user to know what they are doing (see script
            // kiddie)
            // Because it would be nice if scripts didn't blow up if the information
            //    about the physics engine, this function returns an empty string if
            //    the user does not have permission to see it. This as opposed to
            //    throwing an exception.
            m_host.AddScriptLPS(1);
            string ret = String.Empty;
            if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType")))
            {
                if (m_ScriptEngine.World.PhysicsScene != null)
                {
                    ret = m_ScriptEngine.World.PhysicsScene.EngineType;
                    // An old physics engine might have an uninitialized engine type
                    if (ret == null)
                        ret = "unknown";
                }
            }

            return ret;
        }
OSSL_Api