Fix issue with llGetTorque() where it would only ever return a zero vector.

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-01 01:37:35 +01:00
parent 095b3e5756
commit 63bf710237
2 changed files with 1 additions and 10 deletions

View File

@ -1536,15 +1536,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.setAngularImpulse(impulse); m_parentGroup.setAngularImpulse(impulse);
} }
public Vector3 GetTorque()
{
if (m_parentGroup != null)
{
m_parentGroup.GetTorque();
}
return Vector3.Zero;
}
/// <summary> /// <summary>
/// Apply physics to this part. /// Apply physics to this part.
/// </summary> /// </summary>

View File

@ -2202,7 +2202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llGetTorque() public LSL_Vector llGetTorque()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Vector3 torque = m_host.GetTorque(); Vector3 torque = m_host.ParentGroup.GetTorque();
return new LSL_Vector(torque.X,torque.Y,torque.Z); return new LSL_Vector(torque.X,torque.Y,torque.Z);
} }