changed SOP Force and Torque, adding XML (de/)serialization, also changed Buoyance. PLEASE trap deserialization from inventory etc, making force and torque vector3.Zero, unless we want then to rez moving. (needs checking/testing as usual)

This commit is contained in:
UbitUmarov
2012-02-25 22:20:25 +00:00
parent 7b6649177e
commit e07440d0c5
3 changed files with 99 additions and 36 deletions

View File

@@ -2045,30 +2045,9 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void setAngularImpulse(Vector3 impulse)
{
if (RootPart.PhysActor != null)
{
if (!IsAttachment)
{
RootPart.PhysActor.Torque = impulse;
m_scene.PhysicsScene.AddPhysicsActorTaint(RootPart.PhysActor);
}
}
}
public Vector3 GetTorque()
{
if (RootPart.PhysActor != null)
{
if (!IsAttachment)
{
Vector3 torque = RootPart.PhysActor.Torque;
return torque;
}
}
return Vector3.Zero;
return RootPart.Torque;
}
// This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object