Ejemplo n.º 1
0
        public void botSetRot(LSL_Key npc, LSL_Rotation rotation)
        {
            if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "botStandUp", m_host, "bot", m_itemID)) return;
            IScenePresence sp = World.GetScenePresence(UUID.Parse(npc));
            if (sp == null)
                return;
            UUID npcId;
            if (!UUID.TryParse(npc.m_string, out npcId))
                return;

            if (sp != null)
                sp.Rotation = rotation.ToQuaternion();
        }
Ejemplo n.º 2
0
        protected void DropAttachmentAt(bool checkPerms, LSL_Vector pos, LSL_Rotation rot)
        {
            if (checkPerms && ShoutErrorOnLackingOwnerPerms(ScriptBaseClass.PERMISSION_ATTACH, "Cannot drop attachment"))
            {
                return;
            }

            IAttachmentsModule attachmentsModule = World.RequestModuleInterface<IAttachmentsModule>();
            IScenePresence sp = attachmentsModule == null ? null : World.GetScenePresence(m_host.OwnerID);

            if (attachmentsModule != null && sp != null)
            {
                attachmentsModule.DetachSingleAttachmentToGround(m_host.ParentEntity.UUID, sp.ControllingClient, pos.ToVector3(), rot.ToQuaternion());
            }
        }