public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
// LSL quaternions can normalize to 0, normal Quaternions can't.
if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
rot.z = 1; // ZERO_ROTATION = 0,0,0,1
List<ISceneChildEntity> entities = GetLinkParts(link);
if (entities.Count == 0)
return;
entities[0].SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
entities[0].SitTargetOrientation = Rot2Quaternion(rot);
}