예제 #1
0
 public AgentInventoryApi.AgentInventory GetAgentInventory(
     ScriptInstance instance,
     ViewerAgentAccessor agent,
     LSLKey rootFolderID,
     HashtableApi.Hashtable seedResponse) =>
 GetAgentInventory(instance, agent, rootFolderID, seedResponse, VC_AGENT_INVENTORY_FULL_AISV3);
예제 #2
0
            public VcExtraParams(byte[] extraparams)
            {
                int offset = 0;

                if (extraparams.Length == 0)
                {
                    return;
                }
                int numparams = extraparams[offset++];

                while (numparams > 0 && offset + 6 <= extraparams.Length)
                {
                    uint ep = extraparams[offset++];
                    ep = ((uint)extraparams[offset++] << 8) | ep;
                    uint eplength = extraparams[offset + 3];
                    eplength = (eplength << 8) | extraparams[offset + 2];
                    eplength = (eplength << 8) | extraparams[offset + 1];
                    eplength = (eplength << 8) | extraparams[offset + 0];
                    offset  += 4;
                    if (offset + eplength > extraparams.Length)
                    {
                        break;
                    }
                    switch (ep)
                    {
                    case FlexiEP:
                        if (eplength < 16)
                        {
                            break;
                        }
                        HasFlexible   = true.ToLSLBoolean();
                        FlexiSoftness = 0;
                        if ((extraparams[1] & 0x80) != 0)
                        {
                            FlexiSoftness |= 1;
                        }
                        if ((extraparams[0] & 0x80) != 0)
                        {
                            FlexiSoftness |= 2;
                        }
                        FlexiTension  = (extraparams[0] & 0x7F) / 10.01f;
                        FlexiFriction = (extraparams[1] & 0x7f) / 10.01f;
                        FlexiGravity  = extraparams[2] / 10.01f - 10.0f;
                        FlexiWind     = extraparams[3] / 10.01f;
                        FlexiForce    = new Vector3(extraparams, 4);
                        break;

                    case SculptEP:
                        if (eplength < 17)
                        {
                            break;
                        }
                        HasSculpt  = true.ToLSLBoolean();
                        SculptMap  = new UUID(extraparams, offset);
                        SculptType = extraparams[offset + 16];
                        break;

                    case LightEP:
                        if (eplength < 16)
                        {
                            break;
                        }
                        HasLight       = true.ToLSLBoolean();
                        LightColor     = new Vector3(extraparams[offset] / 255.0, extraparams[offset + 1] / 255.0, extraparams[offset + 2] / 255.0);
                        LightIntensity = extraparams[offset + 3] / 255.0;
                        LightRadius    = LEBytes2Float(extraparams, offset + 4);
                        LightCutoff    = LEBytes2Float(extraparams, offset + 8);
                        LightFalloff   = LEBytes2Float(extraparams, offset + 12);
                        break;

                    case ProjectionEP:
                        if (eplength < 28)
                        {
                            break;
                        }
                        HasProjection      = true.ToLSLBoolean();
                        ProjectionTexture  = new UUID(extraparams, offset);
                        ProjectionFOV      = LEBytes2Float(extraparams, 16);
                        ProjectionFocus    = LEBytes2Float(extraparams, 20);
                        ProjectionAmbience = LEBytes2Float(extraparams, 24);
                        break;

                    case ExtendedMeshEP:
                        if (eplength < 4)
                        {
                            break;
                        }
                        MeshFlags = extraparams[offset + 3];
                        MeshFlags = (MeshFlags << 8) | extraparams[offset + 3];
                        MeshFlags = (MeshFlags << 8) | extraparams[offset + 3];
                        MeshFlags = (MeshFlags << 8) | extraparams[offset + 3];
                        break;
                    }

                    offset += (int)eplength;
                }
            }
예제 #3
0
 public EventQueueGetFinishedEvent(ViewerAgentAccessor agentInfo, UUID requestID, int statusCode)
 {
     Agent      = agentInfo;
     RequestID  = requestID;
     StatusCode = statusCode;
 }