Exemplo n.º 1
0
        private void AgentCachedTextureHandler(Packet packet, LLAgent agent)
        {
            AgentCachedTexturePacket cached = (AgentCachedTexturePacket)packet;

            AgentCachedTextureResponsePacket response = new AgentCachedTextureResponsePacket();

            response.Header.Zerocoded = true;

            response.AgentData.AgentID   = agent.ID;
            response.AgentData.SerialNum = cached.AgentData.SerialNum;

            response.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[cached.WearableData.Length];

            // TODO: Respond back with actual cache entries if we have them
            for (int i = 0; i < cached.WearableData.Length; i++)
            {
                response.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
                response.WearableData[i].TextureIndex = cached.WearableData[i].TextureIndex;
                response.WearableData[i].TextureID    = UUID.Zero;
                response.WearableData[i].HostName     = Utils.EmptyBytes;
            }

            m_log.DebugFormat("Sending a cached texture response with {0}/{1} cache hits, SerialNum={2}",
                              0, cached.WearableData.Length, cached.AgentData.SerialNum);

            m_udp.SendPacket(agent, response, ThrottleCategory.Task, false);
        }
Exemplo n.º 2
0
        protected bool AgentTextureCached(SimClient simclient, Packet packet)
        {
            // Console.WriteLine(packet.ToString());
            AgentCachedTexturePacket         chechedtex = (AgentCachedTexturePacket)packet;
            AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket();

            cachedresp.AgentData.AgentID   = this.AgentID;
            cachedresp.AgentData.SessionID = this.SessionID;
            cachedresp.AgentData.SerialNum = this.cachedtextureserial;
            this.cachedtextureserial++;
            cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length];
            for (int i = 0; i < chechedtex.WearableData.Length; i++)
            {
                cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
                cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex;
                cachedresp.WearableData[i].TextureID    = LLUUID.Zero;
                cachedresp.WearableData[i].HostName     = new byte[0];
            }
            this.OutPacket(cachedresp);
            return(true);
        }
Exemplo n.º 3
0
        void AgentCachedTextureHandler(Packet packet, Agent agent)
        {
            AgentCachedTexturePacket cached = (AgentCachedTexturePacket)packet;

            AgentCachedTextureResponsePacket response = new AgentCachedTextureResponsePacket();

            response.AgentData.AgentID   = agent.AgentID;
            response.AgentData.SerialNum = cached.AgentData.SerialNum;

            response.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[cached.WearableData.Length];

            // TODO: Respond back with actual cache entries if we have them
            for (int i = 0; i < cached.WearableData.Length; i++)
            {
                response.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
                response.WearableData[i].TextureIndex = cached.WearableData[i].TextureIndex;
                response.WearableData[i].TextureID    = UUID.Zero;
                response.WearableData[i].HostName     = new byte[0];
            }

            response.Header.Zerocoded = true;

            server.UDP.SendPacket(agent.AgentID, response, PacketCategory.Transaction);
        }
Exemplo n.º 4
0
 protected bool AgentTextureCached(SimClient simclient, Packet packet)
 {
     // Console.WriteLine(packet.ToString());
     AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet;
     AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket();
     cachedresp.AgentData.AgentID = this.AgentID;
     cachedresp.AgentData.SessionID = this.SessionID;
     cachedresp.AgentData.SerialNum = this.cachedtextureserial;
     this.cachedtextureserial++;
     cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length];
     for (int i = 0; i < chechedtex.WearableData.Length; i++)
     {
         cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
         cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex;
         cachedresp.WearableData[i].TextureID = LLUUID.Zero;
         cachedresp.WearableData[i].HostName = new byte[0];
     }
     this.OutPacket(cachedresp);
     return true;
 }
Exemplo n.º 5
0
        private void AgentCachedTextureHandler(Packet packet, LLAgent agent)
        {
            AgentCachedTexturePacket cached = (AgentCachedTexturePacket)packet;

            AgentCachedTextureResponsePacket response = new AgentCachedTextureResponsePacket();
            response.Header.Zerocoded = true;

            response.AgentData.AgentID = agent.ID;
            response.AgentData.SerialNum = cached.AgentData.SerialNum;

            response.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[cached.WearableData.Length];

            // TODO: Respond back with actual cache entries if we have them
            for (int i = 0; i < cached.WearableData.Length; i++)
            {
                response.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
                response.WearableData[i].TextureIndex = cached.WearableData[i].TextureIndex;
                response.WearableData[i].TextureID = UUID.Zero;
                response.WearableData[i].HostName = Utils.EmptyBytes;
            }

            m_log.DebugFormat("Sending a cached texture response with {0}/{1} cache hits, SerialNum={2}",
                0, cached.WearableData.Length, cached.AgentData.SerialNum);

            m_udp.SendPacket(agent, response, ThrottleCategory.Task, false);
        }