コード例 #1
0
ファイル: MOD_Api.cs プロジェクト: Kubwa/opensim
        public LSL_List modInvokeL(string fname, params object[] parms)
        {
//            m_log.DebugFormat(
//                "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", 
//                fname, 
//                string.Join(",", Array.ConvertAll<object, string>(parms, o => o.ToString())), 
//                ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType);

            Type returntype = m_comms.LookupReturnType(fname);
            if (returntype != typeof(object[]))
                MODError(String.Format("return type mismatch for {0}",fname));

            object[] result = (object[])modInvoke(fname,parms);
            object[] llist = new object[result.Length];
            for (int i = 0; i < result.Length; i++)
            {
                if (result[i] is string)
                {
                    llist[i] = new LSL_String((string)result[i]);
                }
                else if (result[i] is int)
                {
                    llist[i] = new LSL_Integer((int)result[i]);
                }
                else if (result[i] is float)
                {
                    llist[i] = new LSL_Float((float)result[i]);
                }
                else if (result[i] is double)
                {
                    llist[i] = new LSL_Float((double)result[i]);
                }
                else if (result[i] is UUID)
                {
                    llist[i] = new LSL_Key(result[i].ToString());
                }
                else if (result[i] is OpenMetaverse.Vector3)
                {
                    OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
                    llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z);
                }
                else if (result[i] is OpenMetaverse.Quaternion)
                {
                    OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
                    llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W);
                }
                else
                {
                    MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name));
                }
            }

            return new LSL_List(llist);
        }
コード例 #2
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
        private LSL_Integer ClearPrimMedia(SceneObjectPart part, LSL_Integer face)
        {
            // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
            // Assuming silently fail means sending back LSL_STATUS_OK.  Ideally, need to check this.
            // FIXME: Don't perform the media check directly
            if (face < 0 || face > part.GetNumberOfSides() - 1)
                return ScriptBaseClass.LSL_STATUS_NOT_FOUND;

            IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
            if (null == module)
                return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;

            module.ClearMediaEntry(part, face);

            return ScriptBaseClass.LSL_STATUS_OK;
        }
コード例 #3
0
ファイル: OSSL_Api.cs プロジェクト: nebadon2025/opensimulator
        public LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
        {
            CheckThreatLevel(ThreatLevel.Moderate, "osGetNumberOfAttachments");

            m_host.AddScriptLPS(1);

            UUID targetUUID;
            ScenePresence target;
            LSL_List resp = new LSL_List();

            if (attachmentPoints.Length >= 1 && UUID.TryParse(avatar.ToString(), out targetUUID) && World.TryGetScenePresence(targetUUID, out target))
            {
                foreach (object point in attachmentPoints.Data)
                {
                    LSL_Integer ipoint = new LSL_Integer(
                        (point is LSL_Integer || point is int || point is uint) ?
                            (int)point :
                            0
                    );
                    resp.Add(ipoint);
                    if (ipoint == 0)
                    {
                        // indicates zero attachments
                        resp.Add(new LSL_Integer(0));
                    }
                    else
                    {
                        // gets the number of attachments on the attachment point
                        resp.Add(new LSL_Integer(target.GetAttachments((uint)ipoint).Count));
                    }
                }
            }

            return resp;
        }
コード例 #4
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
 public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules)
 {
     m_host.AddScriptLPS(1);
     ScriptSleep(1000);
     return SetPrimMediaParams(m_host, face, rules);
 }
コード例 #5
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
 public LSL_Integer llClearPrimMedia(LSL_Integer face)
 {
     m_host.AddScriptLPS(1);
     ScriptSleep(1000);
     return ClearPrimMedia(m_host, face);
 }
コード例 #6
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
 public void llScriptProfiler(LSL_Integer flags)
 {
     m_host.AddScriptLPS(1);
     // This does nothing for LSO scripts in SL
 }
コード例 #7
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
 {
     m_host.AddScriptLPS(1);
     if (link == ScriptBaseClass.LINK_ROOT)
         SitTarget(m_host.ParentGroup.RootPart, offset, rot);
     else if (link == ScriptBaseClass.LINK_THIS)
         SitTarget(m_host, offset, rot);
     else
     {
         SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
         if (null != part)
         {
             SitTarget(part, offset, rot);
         }
     }
 }
コード例 #8
0
ファイル: LSL_Api.cs プロジェクト: BackupTheBerlios/seleon
        public void  llRegionSayTo( LSL_Key target, LSL_Integer channel, LSL_String msg )
        {
            m_host.AddScriptLPS(1);
            NotImplemented("llRegionSayTo");

        }
コード例 #9
0
ファイル: LSL_Api.cs プロジェクト: BackupTheBerlios/seleon
        public void llScriptProfiler( LSL_Integer flags )
        {
            m_host.AddScriptLPS(1);
            NotImplemented("llScriptProfiler");

        }
コード例 #10
0
ファイル: LSL_Api.cs プロジェクト: Barosonix/Barosonix-Core
        public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
        {
            m_host.AddScriptLPS(1);

            if (link == ScriptBaseClass.LINK_SET ||
                link == ScriptBaseClass.LINK_ALL_CHILDREN ||
                link == ScriptBaseClass.LINK_ALL_OTHERS) return;

            SceneObjectPart part = null;

            switch (link)
            {
                case ScriptBaseClass.LINK_ROOT:
                    part = m_host.ParentGroup.RootPart;
                    break;
                case ScriptBaseClass.LINK_THIS:
                    part = m_host;
                    break;
                default:
                    part = m_host.ParentGroup.GetLinkNumPart(link);
                    break;
            }

            if (null != part)
            {
                part.SetCameraEyeOffset(eye);
                part.SetCameraAtOffset(at);
            }
        }
コード例 #11
0
 public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
 {
     m_OSSL_Functions.osNpcTouch(npcLSL_Key, object_key, link_num);
 }
コード例 #12
0
ファイル: LSL_Api.cs プロジェクト: Barosonix/Barosonix-Core
        public void llSetContentType(LSL_Key id, LSL_Integer type)
        {
            m_host.AddScriptLPS(1);

            if (m_UrlModule == null)
                return;

            // Make sure the content type is text/plain to start with
            m_UrlModule.HttpContentType(new UUID(id), "text/plain");

            // Is the object owner online and in the region
            ScenePresence agent = World.GetScenePresence(m_host.ParentGroup.OwnerID);
            if (agent == null || agent.IsChildAgent)
                return;  // Fail if the owner is not in the same region

            // Is it the embeded browser?
            string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent");
            if (userAgent.IndexOf("SecondLife") < 0)
                return; // Not the embedded browser. Is this check good enough?

            // Use the IP address of the client and check against the request
            // seperate logins from the same IP will allow all of them to get non-text/plain as long
            // as the owner is in the region. Same as SL!
            string logonFromIPAddress = agent.ControllingClient.RemoteEndPoint.Address.ToString();
            string requestFromIPAddress = m_UrlModule.GetHttpHeader(new UUID(id), "remote_addr");
            //m_log.Debug("IP from header='" + requestFromIPAddress + "' IP from endpoint='" + logonFromIPAddress + "'");
            if (requestFromIPAddress == null || requestFromIPAddress.Trim() == "")
                return;
            if (logonFromIPAddress == null || logonFromIPAddress.Trim() == "")
                return;

            // If the request isnt from the same IP address then the request cannot be from the owner
            if (!requestFromIPAddress.Trim().Equals(logonFromIPAddress.Trim()))
                return;

            switch (type)
            {
                case ScriptBaseClass.CONTENT_TYPE_HTML:
                    m_UrlModule.HttpContentType(new UUID(id), "text/html");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_XML:
                    m_UrlModule.HttpContentType(new UUID(id), "application/xml");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_XHTML:
                    m_UrlModule.HttpContentType(new UUID(id), "application/xhtml+xml");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_ATOM:
                    m_UrlModule.HttpContentType(new UUID(id), "application/atom+xml");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_JSON:
                    m_UrlModule.HttpContentType(new UUID(id), "application/json");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_LLSD:
                    m_UrlModule.HttpContentType(new UUID(id), "application/llsd+xml");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_FORM:
                    m_UrlModule.HttpContentType(new UUID(id), "application/x-www-form-urlencoded");
                    break;
                case ScriptBaseClass.CONTENT_TYPE_RSS:
                    m_UrlModule.HttpContentType(new UUID(id), "application/rss+xml");
                    break;
                default:
                    m_UrlModule.HttpContentType(new UUID(id), "text/plain");
                    break;
            }
        }
コード例 #13
0
ファイル: LSL_Api.cs プロジェクト: Gitlab11/opensim
        public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
        {
            m_host.AddScriptLPS(1);
            ScriptSleep(m_sleepMsOnSetLinkMedia);
            if (link == ScriptBaseClass.LINK_ROOT)
                return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
            else if (link == ScriptBaseClass.LINK_THIS)
                return SetPrimMediaParams(m_host, face, rules);
            else
            {
                SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
                if (null != part)
                    return SetPrimMediaParams(part, face, rules);
            }

            return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
        }
コード例 #14
0
ファイル: LSL_Stub.cs プロジェクト: justasabc/opensim75grid
 public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
 {
     m_LSL_Functions.llSetLinkCamera(link, eye, at);
 }
コード例 #15
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
 {
     return m_LSL_Functions.llGetAgentList(scope, options);
 }
コード例 #16
0
ファイル: LSL_Api.cs プロジェクト: BackupTheBerlios/seleon
        public LSL_Integer llClearPrimMedia(LSL_Integer face)
        {
            m_host.AddScriptLPS(1);
            ScriptSleep(1000);

            // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
            // Assuming silently fail means sending back LSL_STATUS_OK.  Ideally, need to check this.
            // FIXME: Don't perform the media check directly
            if (face < 0 || face > m_host.GetNumberOfSides() - 1)
                return ScriptBaseClass.LSL_STATUS_OK;

            IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
            if (null == module)
                throw new Exception("Media on a prim functions not available");

            module.ClearMediaEntry(m_host, face);

            return ScriptBaseClass.LSL_STATUS_OK;
        }
コード例 #17
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
 public LSL_Integer llSetMemoryLimit(LSL_Integer limit)
 {
     m_host.AddScriptLPS(1);
     // Treat as an LSO script
     return ScriptBaseClass.FALSE;
 }
コード例 #18
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public void llScriptProfiler(LSL_Integer flags)
 {
     m_LSL_Functions.llScriptProfiler(flags);
 }
コード例 #19
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
        /// <summary>
        /// http://wiki.secondlife.com/wiki/LlGetAgentList
        /// The list of options is currently not used in SL
        /// scope is one of:-
        /// AGENT_LIST_REGION - all in the region
        /// AGENT_LIST_PARCEL - all in the same parcel as the scripted object
        /// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
        /// current parcel.
        /// </summary>
        public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
        {
            m_host.AddScriptLPS(1);

            // the constants are 1, 2 and 4 so bits are being set, but you
            // get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
            bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
            bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
            bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;

            LSL_List result = new LSL_List();

            if (!regionWide && !parcelOwned && !parcel)
            {
                result.Add("INVALID_SCOPE");
                return result;
            }

            ILandObject land;
            Vector3 pos;
            UUID id = UUID.Zero;
            if (parcel || parcelOwned)
            {
                pos = m_host.ParentGroup.RootPart.GetWorldPosition();
                land = World.LandChannel.GetLandObject(pos.X, pos.Y);
                if (land == null)
                {
                    id = UUID.Zero;
                }
                else
                {
                    if (parcelOwned)
                    {
                        id = land.LandData.OwnerID;
                    }
                    else
                    {
                        id = land.LandData.GlobalID;
                    }
                }
            }
            List<UUID> presenceIds = new List<UUID>();

            World.ForEachRootScenePresence(
                delegate (ScenePresence ssp)
                {
                    // Gods are not listed in SL
                    if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
                    {
                        if (!regionWide)
                        {
                            pos = ssp.AbsolutePosition;
                            land = World.LandChannel.GetLandObject(pos.X, pos.Y);
                            if (land != null)
                            {
                                if (parcelOwned && land.LandData.OwnerID == id ||
                                    parcel && land.LandData.GlobalID == id)
                                {
                                    result.Add(ssp.UUID.ToString());
                                }
                            }
                        }
                        else
                        {
                            result.Add(ssp.UUID.ToString());
                        }
                    }
                    // Maximum of 100 results
                    if (result.Length > 99)
                    {
                        return;
                    }
                }
            );
            return result;
        }
コード例 #20
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public LSL_Integer llSetMemoryLimit(LSL_Integer limit)
 {
     return m_LSL_Functions.llSetMemoryLimit(limit);
 }
コード例 #21
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
        public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
        {
            m_host.AddScriptLPS(1);
            ScriptSleep(1000);
            if (link == ScriptBaseClass.LINK_ROOT)
                return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
            else if (link == ScriptBaseClass.LINK_THIS)
                return GetPrimMediaParams(m_host, face, rules);
            else
            {
                SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
                if (null != part)
                    return GetPrimMediaParams(part, face, rules);
            }

            return new LSL_List();
        }
コード例 #22
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
 {
     m_LSL_Functions.llLinkSitTarget(link, offset, rot);
 }
コード例 #23
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
        private LSL_Integer SetPrimMediaParams(SceneObjectPart part, LSL_Integer face, LSL_List rules)
        {
            // LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid
            // Assuming silently fail means sending back LSL_STATUS_OK.  Ideally, need to check this.
            // Don't perform the media check directly
            if (face < 0 || face > part.GetNumberOfSides() - 1)
                return ScriptBaseClass.LSL_STATUS_NOT_FOUND;

            IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
            if (null == module)
                return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;

            MediaEntry me = module.GetMediaEntry(part, face);
            if (null == me)
                me = new MediaEntry();

            int i = 0;

            while (i < rules.Length - 1)
            {
                int code = rules.GetLSLIntegerItem(i++);

                switch (code)
                {
                    case ScriptBaseClass.PRIM_MEDIA_ALT_IMAGE_ENABLE:
                        me.EnableAlterntiveImage = (rules.GetLSLIntegerItem(i++) != 0 ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_CONTROLS:
                        int v = rules.GetLSLIntegerItem(i++);
                        if (ScriptBaseClass.PRIM_MEDIA_CONTROLS_STANDARD == v)
                            me.Controls = MediaControls.Standard;
                        else
                            me.Controls = MediaControls.Mini;
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_CURRENT_URL:
                        me.CurrentURL = rules.GetLSLStringItem(i++);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_HOME_URL:
                        me.HomeURL = rules.GetLSLStringItem(i++);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_AUTO_LOOP:
                        me.AutoLoop = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_AUTO_PLAY:
                        me.AutoPlay = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_AUTO_SCALE:
                        me.AutoScale = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_AUTO_ZOOM:
                        me.AutoZoom = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_FIRST_CLICK_INTERACT:
                        me.InteractOnFirstClick = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_WIDTH_PIXELS:
                        me.Width = (int)rules.GetLSLIntegerItem(i++);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_HEIGHT_PIXELS:
                        me.Height = (int)rules.GetLSLIntegerItem(i++);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_WHITELIST_ENABLE:
                        me.EnableWhiteList = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_WHITELIST:
                        string[] rawWhiteListUrls = rules.GetLSLStringItem(i++).ToString().Split(new char[] { ',' });
                        List<string> whiteListUrls = new List<string>();
                        Array.ForEach(
                            rawWhiteListUrls, delegate(string rawUrl) { whiteListUrls.Add(rawUrl.Trim()); });
                        me.WhiteList = whiteListUrls.ToArray();
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_PERMS_INTERACT:
                        me.InteractPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
                        break;

                    case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
                        me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
                        break;

                    default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS;
                }
            }

            module.SetMediaEntry(part, face, me);

            return ScriptBaseClass.LSL_STATUS_OK;
        }
コード例 #24
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
 {
     return m_LSL_Functions.llSetLinkMedia(link, face, rules);
 }
コード例 #25
0
ファイル: LSL_Api.cs プロジェクト: OpenPlex-Sim/opensim
        public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
        {
            m_host.AddScriptLPS(1);
            ScriptSleep(1000);
            if (link == ScriptBaseClass.LINK_ROOT)
                return ClearPrimMedia(m_host.ParentGroup.RootPart, face);
            else if (link == ScriptBaseClass.LINK_THIS)
                return ClearPrimMedia(m_host, face);
            else
            {
                SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
                if (null != part)
                    return ClearPrimMedia(part, face);
            }

            return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
        }
コード例 #26
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public LSL_Integer llClearPrimMedia(LSL_Integer face)
 {
     return m_LSL_Functions.llClearPrimMedia(face);
 }
コード例 #27
0
ファイル: OSSL_Api.cs プロジェクト: nebadon2025/opensimulator
        public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
        {
            CheckThreatLevel(ThreatLevel.High, "osNpcTouch");
            m_host.AddScriptLPS(1);
            
            INPCModule module = World.RequestModuleInterface<INPCModule>();
            int linkNum = link_num.value;
            if (module != null || (linkNum < 0 && linkNum != ScriptBaseClass.LINK_THIS))
            {
                UUID npcId;
                if (!UUID.TryParse(npcLSL_Key, out npcId) || !module.CheckPermissions(npcId, m_host.OwnerID))
                    return;

                SceneObjectPart part = null;
                UUID objectId;
                if (UUID.TryParse(LSL_String.ToString(object_key), out objectId))
                    part = World.GetSceneObjectPart(objectId);

                if (part == null)
                    return;

                if (linkNum != ScriptBaseClass.LINK_THIS)
                {
                    if (linkNum == 0 || linkNum == ScriptBaseClass.LINK_ROOT)
                    { // 0 and 1 are treated as root, find the root if the current part isnt it
                        if (!part.IsRoot)
                            part = part.ParentGroup.RootPart;
                    }
                    else
                    { // Find the prim with the given link number if not found then fail silently
                        part = part.ParentGroup.GetLinkNumPart(linkNum);
                        if (part == null)
                            return;
                    }
                }

                module.Touch(npcId, part.UUID);
            }
        }
コード例 #28
0
ファイル: LSL_Stub.cs プロジェクト: p07r0457/opensim
 public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
 {
     return m_LSL_Functions.llClearLinkMedia(link, face);
 }
コード例 #29
0
ファイル: MOD_Api.cs プロジェクト: p07r0457/opensim
        public LSL_List modInvokeL(string fname, params object[] parms)
        {
            Type returntype = m_comms.LookupReturnType(fname);
            if (returntype != typeof(object[]))
                MODError(String.Format("return type mismatch for {0}",fname));

            object[] result = (object[])modInvoke(fname,parms);
            object[] llist = new object[result.Length];
            for (int i = 0; i < result.Length; i++)
            {
                if (result[i] is string)
                {
                    llist[i] = new LSL_String((string)result[i]);
                }
                else if (result[i] is int)
                {
                    llist[i] = new LSL_Integer((int)result[i]);
                }
                else if (result[i] is float)
                {
                    llist[i] = new LSL_Float((float)result[i]);
                }
                else if (result[i] is UUID)
                {
                    llist[i] = new LSL_Key(result[i].ToString());
                }
                else if (result[i] is OpenMetaverse.Vector3)
                {
                    OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
                    llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z);
                }
                else if (result[i] is OpenMetaverse.Quaternion)
                {
                    OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
                    llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W);
                }
                else
                {
                    MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name));
                }
            }

            return new LSL_List(llist);
        }
コード例 #30
0
ファイル: LSL_Stub.cs プロジェクト: BogusCurry/arribasim-dev
 public void llSetContentType(LSL_Key id, LSL_Integer type)
 {
     m_LSL_Functions.llSetContentType(id, type);
 }