added llSetVelocity. will refuse to work on vehicles and on attachments ( this last may need fix) added also some code for llSetAngularVelocity but not working still

This commit is contained in:
UbitUmarov
2012-07-06 17:13:11 +01:00
parent ba91d4ba93
commit ce7864632b
4 changed files with 57 additions and 1 deletions

View File

@@ -2538,6 +2538,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.ApplyImpulse(v, local != 0);
}
public void llApplyRotationalImpulse(LSL_Vector force, int local)
{
m_host.AddScriptLPS(1);
@@ -2564,6 +2565,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
llSetTorque(torque, local);
}
public void llSetVelocity(LSL_Vector vel, int local)
{
m_host.AddScriptLPS(1);
m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0);
}
public LSL_Vector llGetVel()
{
m_host.AddScriptLPS(1);
@@ -2590,10 +2597,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return new LSL_Vector(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z);
}
public void llSetAngularVelocity(LSL_Vector avel, int local)
{
m_host.AddScriptLPS(1);
// Still not done !!!!
// m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0);
}
public LSL_Vector llGetOmega()
{
m_host.AddScriptLPS(1);
return new LSL_Vector(m_host.AngularVelocity.X, m_host.AngularVelocity.Y, m_host.AngularVelocity.Z);
Vector3 avel = m_host.AngularVelocity;
return new LSL_Vector(avel.X, avel.Y, avel.Z);
}
public LSL_Float llGetTimeOfDay()