public void llSetAngularVelocity(LSL_Vector force, LSL_Integer local)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
Vector3 rotvelocity = new Vector3((float)force.x, (float)force.y, (float)force.z);
if (local == 1)
{
Quaternion grot = m_host.GetWorldRotation();
Quaternion AXgrot = grot;
Vector3 AXimpulsei = rotvelocity;
Vector3 newimpulse = AXimpulsei * AXgrot;
rotvelocity = newimpulse;
}
if (m_host.ParentEntity.RootChild.PhysActor != null)
m_host.ParentEntity.RootChild.PhysActor.RotationalVelocity = rotvelocity;
}