llSetPos(), llGetPos(), llGetLocalPos() now implemented

afrisby
Sean Dague 2007-09-13 14:19:57 +00:00
parent 0709d96716
commit 23b8e39c1b
1 changed files with 39 additions and 4 deletions

View File

@ -238,15 +238,50 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
return ""; return "";
} }
public void llSetPos(LSL_Types.Vector3 pos) { return; } public void llSetPos(LSL_Types.Vector3 pos)
{
LLVector3 tmp;
if (m_host.ParentID != 0)
{
tmp = m_host.OffsetPosition;
}
else
{
tmp = m_host.GroupPosition;
}
tmp.X = (float)pos.X;
tmp.Y = (float)pos.Y;
tmp.Z = (float)pos.Z;
if (m_host.ParentID != 0)
{
m_host.OffsetPosition = tmp;
}
else
{
m_host.GroupPosition = tmp;
}
return;
}
public LSL_Types.Vector3 llGetPos() public LSL_Types.Vector3 llGetPos()
{ {
throw new NotImplementedException("llGetPos"); return new LSL_Types.Vector3(m_host.AbsolutePosition.X,
// return m_host.AbsolutePosition; m_host.AbsolutePosition.Y,
m_host.AbsolutePosition.Z);
} }
public LSL_Types.Vector3 llGetLocalPos() { return new LSL_Types.Vector3(); } public LSL_Types.Vector3 llGetLocalPos()
{
if (m_host.ParentID != 0) {
return new LSL_Types.Vector3(m_host.OffsetPosition.X,
m_host.OffsetPosition.Y,
m_host.OffsetPosition.Z);
} else {
return new LSL_Types.Vector3(m_host.AbsolutePosition.X,
m_host.AbsolutePosition.Y,
m_host.AbsolutePosition.Z);
}
}
public void llSetRot(LSL_Types.Quaternion rot) { } public void llSetRot(LSL_Types.Quaternion rot) { }
public LSL_Types.Quaternion llGetRot() { return new LSL_Types.Quaternion(); } public LSL_Types.Quaternion llGetRot() { return new LSL_Types.Quaternion(); }
public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); } public LSL_Types.Quaternion llGetLocalRot() { return new LSL_Types.Quaternion(); }