Exemple #1
0
        public void Read(PacketReader stream)
        {
            Name     = stream.ReadString();
            BodyMesh = (HumBodyMeshs)stream.ReadByte();
            BodyTex  = (HumBodyTexs)stream.ReadByte();
            HeadMesh = (HumHeadMeshs)stream.ReadByte();
            HeadTex  = (HumHeadTexs)stream.ReadByte();
            Voice    = (HumVoices)stream.ReadByte();

            BodyWidth = stream.ReadFloat();
            Fatness   = stream.ReadFloat();
        }
Exemple #2
0
        public override void OnReadProperties(PacketReader stream)
        {
            base.OnReadProperties(stream);
            UseCustoms = stream.ReadBit();
            if (UseCustoms)
            {
                CustomBodyTex  = (HumBodyTexs)stream.ReadByte();
                CustomHeadMesh = (HumHeadMeshs)stream.ReadByte();
                CustomHeadTex  = (HumHeadTexs)stream.ReadByte();
                CustomVoice    = (HumVoices)stream.ReadByte();
                CustomFatness  = stream.ReadFloat();
                CustomScale    = stream.ReadVec3f();
                CustomName     = stream.ReadString();
            }

            _Uncon = (Unconsciousness)stream.ReadByte();
            TeamId = stream.ReadSByte();
        }
Exemple #3
0
        public void RandomizeCustomVisuals(string name, bool male)
        {
            if (male)
            {
                CustomBodyTex  = (HumBodyTexs)Randomizer.GetInt(0, 4);
                CustomHeadMesh = (HumHeadMeshs)Randomizer.GetInt(6);
                CustomVoice    = (HumVoices)Randomizer.GetInt(15);
                switch (CustomBodyTex)
                {
                case HumBodyTexs.M_Pale:
                    CustomHeadTex = (HumHeadTexs)Randomizer.GetInt(41, 58);
                    break;

                case HumBodyTexs.M_Normal:
                case HumBodyTexs.G1Hero:
                case HumBodyTexs.G2Hero:
                case HumBodyTexs.M_Tattooed:
                    CustomHeadTex = (HumHeadTexs)Randomizer.GetInt(58, 120);
                    break;

                case HumBodyTexs.M_Latino:
                    CustomHeadTex = (HumHeadTexs)Randomizer.GetInt(120, 129);
                    break;

                case HumBodyTexs.M_Black:
                    CustomHeadTex = (HumHeadTexs)Randomizer.GetInt(129, 137);
                    break;
                }
            }

            var size = Randomizer.GetFloat(0.95f, 1.05f);

            CustomFatness = Randomizer.GetFloat(-1, 1);
            CustomScale   = new Vec3f(size, 1.0f, size);
            CustomName    = name;
            UseCustoms    = true;
        }