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)
This commit is contained in:
Charles Krinke
2007-12-17 02:30:03 +00:00
parent 413fcc5709
commit 8e8c26acac
5 changed files with 71 additions and 20 deletions

View File

@@ -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);
}
}
}

View File

@@ -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)