Add implementations for llSetVelocity and llSetAngularVelocity.

This commit is contained in:
Robert Adams
2013-07-06 09:53:30 -07:00
parent a65cec3986
commit d838f15d97
3 changed files with 38 additions and 0 deletions

View File

@@ -2382,6 +2382,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return force;
}
public void llSetVelocity(LSL_Vector velocity, int local)
{
m_host.AddScriptLPS(1);
if (!m_host.ParentGroup.IsDeleted)
{
if (local != 0)
velocity *= llGetRot();
m_host.ParentGroup.RootPart.Velocity = velocity;
}
}
public void llSetAngularVelocity(LSL_Vector angularVelocity, int local)
{
m_host.AddScriptLPS(1);
if (!m_host.ParentGroup.IsDeleted)
{
if (local != 0)
angularVelocity *= llGetRot();
m_host.ParentGroup.RootPart.AngularVelocity = angularVelocity;
}
}
public LSL_Integer llTarget(LSL_Vector position, double range)
{
m_host.AddScriptLPS(1);