From 8e8c26acac73cc50d43976fe58ba8fcdaa4afe33 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 17 Dec 2007 02:30:03 +0000 Subject: Again, thanks to Alondria for: Added: LinkNum to SceneObjectPart Added: Bunch-o settings of LinkNum in SceneObjectGroup Added: llGetNumberOfPrims() Added: llGetLinkNumber() Added: llGetLinkKey() Added: llGetLinkName() (and change to string return type) --- .../DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | 6 ++-- .../Compiler/Server_API/LSL_BuiltIn_Commands.cs | 35 ++++++++++++++++------ 2 files changed, 29 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 99f8d3b..d669c15 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs @@ -860,9 +860,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL return m_LSL_Functions.llGetLinkKey(linknum); } - public void llGetLinkName(int linknum) + public string llGetLinkName(int linknum) { - m_LSL_Functions.llGetLinkName(linknum); + return m_LSL_Functions.llGetLinkName(linknum); } public int llGetInventoryNumber(int type) @@ -2122,4 +2122,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public vector ZERO_VECTOR = new vector(0, 0, 0); public rotation ZERO_ROTATION = new rotation(0, 0, 0, 0); } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 00e79c0..61c4b10 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -1128,7 +1128,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) { - NotImplemented("llTargetOmega"); + m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); + m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); + m_host.ScheduleTerseUpdate(); + m_host.SendTerseUpdateToAllClients(); + //NotImplemented("llTargetOmega"); } public int llGetStartParameter() @@ -1161,8 +1165,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public int llGetLinkNumber() { - NotImplemented("llGetLinkNumber"); - return 0; + return m_host.LinkNum; } public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) @@ -1187,13 +1190,28 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public string llGetLinkKey(int linknum) { - NotImplemented("llGetLinkKey"); - return ""; + SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); + if (part != null) + { + return part.UUID.ToStringHyphenated(); + } + else + { + return "00000000-0000-0000-0000-000000000000"; + } } - public void llGetLinkName(int linknum) + public string llGetLinkName(int linknum) { - NotImplemented("llGetLinkName"); + SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); + if (part != null) + { + return part.Name; + } + else + { + return "00000000-0000-0000-0000-000000000000"; + } } public int llGetInventoryNumber(int type) @@ -2194,8 +2212,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public int llGetNumberOfPrims() { - NotImplemented("llGetNumberOfPrims"); - return 0; + return m_host.ParentGroup.PrimCount; } public string llGetNumberOfNotecardLines(string name) -- cgit v1.1