Add implementations for llSetVelocity and llSetAngularVelocity.
parent
a65cec3986
commit
d838f15d97
|
@ -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);
|
||||
|
|
|
@ -342,6 +342,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
void llSetDamage(double damage);
|
||||
void llSetForce(LSL_Vector force, int local);
|
||||
void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local);
|
||||
void llSetVelocity(LSL_Vector velocity, int local);
|
||||
void llSetAngularVelocity(LSL_Vector angularVelocity, int local);
|
||||
void llSetHoverHeight(double height, int water, double tau);
|
||||
void llSetInventoryPermMask(string item, int mask, int value);
|
||||
void llSetLinkAlpha(int linknumber, double alpha, int face);
|
||||
|
|
|
@ -1548,6 +1548,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
m_LSL_Functions.llSetForceAndTorque(force, torque, local);
|
||||
}
|
||||
|
||||
public void llSetVelocity(LSL_Vector force, int local)
|
||||
{
|
||||
m_LSL_Functions.llSetVelocity(force, local);
|
||||
}
|
||||
|
||||
public void llSetAngularVelocity(LSL_Vector force, int local)
|
||||
{
|
||||
m_LSL_Functions.llSetAngularVelocity(force, local);
|
||||
}
|
||||
|
||||
public void llSetHoverHeight(double height, int water, double tau)
|
||||
{
|
||||
m_LSL_Functions.llSetHoverHeight(height, water, tau);
|
||||
|
|
Loading…
Reference in New Issue