From 3b4c2c1ff1bfb8bf7b6a53c54cc9d6036d4ed9eb Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 13 Jun 2008 01:54:53 +0000 Subject: A little minor cleanup and harmonizing between LSL_BuiltIn_Commands.cs and its copy LSL_ScriptCommands.cs --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 20 +++++++++----------- .../ScriptEngine/XEngine/LSL_ScriptCommands.cs | 8 -------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 688354c..e2909ff 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -753,14 +753,20 @@ namespace OpenSim.Region.ScriptEngine.Common return new LSL_Types.Vector3(0, 0, 0); return new LSL_Types.Vector3(SensedObject.Velocity.X, SensedObject.Velocity.Y, SensedObject.Velocity.Z); - // return new LSL_Types.Vector3(); } public LSL_Types.Vector3 llDetectedGrab(int number) { m_host.AddScriptLPS(1); - NotImplemented("llDetectedGrab"); - return new LSL_Types.Vector3(); + EntityBase SensedObject = entityDetectedKey(number); + if (SensedObject == null) + return new LSL_Types.Vector3(0, 0, 0); + + return new LSL_Types.Vector3( + SensedObject.AbsolutePosition.X, + SensedObject.AbsolutePosition.Y, + SensedObject.AbsolutePosition.Y ); + } public LSL_Types.Quaternion llDetectedRot(int number) @@ -3036,7 +3042,6 @@ namespace OpenSim.Region.ScriptEngine.Common z = axis.z * t; return new LSL_Types.Quaternion(x,y,z,s); - // NotImplemented("llAxisAngle2Rot"); } @@ -3123,7 +3128,6 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2; -// NotImplemented("llAngleBetween"); } public string llGetInventoryKey(string name) @@ -4400,12 +4404,6 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.AddScriptLPS(1); return m_host.GetAvatarOnSitTarget().ToString(); - //LLUUID AVID = m_host.GetAvatarOnSitTarget(); - - //if (AVID != LLUUID.Zero) - // return AVID.ToString(); - //else - // return String.Empty; } public void llAddToLandPassList(string avatar, double hours) diff --git a/OpenSim/Region/ScriptEngine/XEngine/LSL_ScriptCommands.cs b/OpenSim/Region/ScriptEngine/XEngine/LSL_ScriptCommands.cs index d901c21..9c660c1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/LSL_ScriptCommands.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/LSL_ScriptCommands.cs @@ -2978,7 +2978,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine z = axis.z * t; return new LSL_Types.Quaternion(x,y,z,s); - // NotImplemented("llAxisAngle2Rot"); } @@ -3065,7 +3064,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_host.AddScriptLPS(1); return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2; -// NotImplemented("llAngleBetween"); } public string llGetInventoryKey(string name) @@ -4266,12 +4264,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine { m_host.AddScriptLPS(1); return m_host.GetAvatarOnSitTarget().ToString(); - //LLUUID AVID = m_host.GetAvatarOnSitTarget(); - - //if (AVID != LLUUID.Zero) - // return AVID.ToString(); - //else - // return String.Empty; } public void llAddToLandPassList(string avatar, double hours) -- cgit v1.1