Ejemplo n.º 1
0
        public void SendAppearanceToOtherAgent(SimClient userInfo)
        {
            AvatarAppearancePacket avp = new AvatarAppearancePacket();

            avp.VisualParam             = new AvatarAppearancePacket.VisualParamBlock[218];
            avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes();

            //a wearable update packets should only be sent about the viewers/agents own avatar not for other avatars
            //but it seems that the following code only created the packets and never actually sent them anyway

            /*AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
             * aw.AgentData.AgentID = this.ControllingClient.AgentID;
             * aw.AgentData.SessionID = userInfo.SessionID;
             * aw.AgentData.SerialNum = 0; //removed the use of a random number as a random number could be less than the last number, should have a counter variable for this
             *
             * aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
             * AgentWearablesUpdatePacket.WearableDataBlock awb;
             * for (int i = 0; i < 13; i++)
             * {
             *  awb = new AgentWearablesUpdatePacket.WearableDataBlock();
             *  awb.WearableType = (byte)i;
             *  awb.AssetID = this.Wearables[i].AssetID;
             *  awb.ItemID = this.Wearables[i].ItemID;
             *  aw.WearableData[i] = awb;
             * }*/

            AvatarAppearancePacket.VisualParamBlock avblock = null;
            for (int i = 0; i < 218; i++)
            {
                avblock            = new AvatarAppearancePacket.VisualParamBlock();
                avblock.ParamValue = visualParams[i];
                avp.VisualParam[i] = avblock;
            }

            avp.Sender.IsTrial = false;
            avp.Sender.ID      = ControllingClient.AgentID;
            userInfo.OutPacket(avp);
        }
Ejemplo n.º 2
0
        public void SendAppearanceToOtherAgent(SimClient userInfo)
        {
            AvatarAppearancePacket avp = new AvatarAppearancePacket();
            avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
            avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes();

            //a wearable update packets should only be sent about the viewers/agents own avatar not for other avatars
            //but it seems that the following code only created the packets and never actually sent them anyway
            /*AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
            aw.AgentData.AgentID = this.ControllingClient.AgentID;
            aw.AgentData.SessionID = userInfo.SessionID;
            aw.AgentData.SerialNum = 0; //removed the use of a random number as a random number could be less than the last number, should have a counter variable for this

            aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
            AgentWearablesUpdatePacket.WearableDataBlock awb;
            for (int i = 0; i < 13; i++)
            {
                awb = new AgentWearablesUpdatePacket.WearableDataBlock();
                awb.WearableType = (byte)i;
                awb.AssetID = this.Wearables[i].AssetID;
                awb.ItemID = this.Wearables[i].ItemID;
                aw.WearableData[i] = awb;
            }*/

            AvatarAppearancePacket.VisualParamBlock avblock = null;
            for (int i = 0; i < 218; i++)
            {
                avblock = new AvatarAppearancePacket.VisualParamBlock();
                avblock.ParamValue = visualParams[i];
                avp.VisualParam[i] = avblock;
            }

            avp.Sender.IsTrial = false;
            avp.Sender.ID = ControllingClient.AgentID;
            userInfo.OutPacket(avp);
        }