A hand set is a set of hands (left and right) for an appearance (light, dark or medium).
Esempio n. 1
0
        /// <summary>
        /// Reloads the hand meshes.
        /// </summary>
        private void ReloadHandgroup()
        {
            if (m_LeftHandInstance != null)
                base.RemoveAppearance(m_LeftHandInstance, true);
            if(m_RightHandInstance != null)
                base.RemoveAppearance(m_RightHandInstance, true);

            if (m_Handgroup != null)
            {
                var hgroup = m_Handgroup.LiteralHandgroup;
                if (hgroup == null)
                {
                    var HandgroupID = m_Handgroup.GetHandgroup();
                    if (HandgroupID.FileID == 0) HandgroupID.FileID = (int)(158913789970 >> 32);
                    hgroup = FSO.Content.Content.Get().AvatarHandgroups.Get(HandgroupID.TypeID, HandgroupID.FileID);
                }

                FSO.Vitaboy.HandSet HSet = null;
                if (hgroup.TS1HandSet) HSet = hgroup.LightSkin;
                else {
                    switch (m_Appearance)
                    {
                        case AppearanceType.Light:
                            HSet = hgroup.LightSkin;
                            break;
                        case AppearanceType.Medium:
                            HSet = hgroup.MediumSkin;
                            break;
                        case AppearanceType.Dark:
                            HSet = hgroup.DarkSkin;
                            break;
                    }
                }

                Appearance LeftApr, RightApr;
                string LeftTex = null, RightTex = null;
                if (hgroup.TS1HandSet)
                {
                    string LeftID = null;
                    string RightID = null;
                    switch (m_LeftHandGesture)
                    {
                        case SimHandGesture.Idle:
                            LeftID = HSet.LeftHand.Idle.Name;
                            LeftTex = HSet.LeftHand.Idle.TexName;
                            break;
                        case SimHandGesture.Fist:
                            LeftID = HSet.LeftHand.Fist.Name;
                            LeftTex = HSet.LeftHand.Fist.TexName;
                            break;
                        case SimHandGesture.Pointing:
                            LeftID = HSet.LeftHand.Pointing.Name;
                            LeftTex = HSet.LeftHand.Pointing.TexName;
                            break;
                    }

                    switch (m_RightHandGesture)
                    {
                        case SimHandGesture.Idle:
                            RightID = HSet.RightHand.Idle.Name;
                            RightTex = HSet.RightHand.Idle.TexName;
                            break;
                        case SimHandGesture.Fist:
                            RightID = HSet.RightHand.Fist.Name;
                            RightTex = HSet.RightHand.Idle.TexName;
                            break;
                        case SimHandGesture.Pointing:
                            RightID = HSet.RightHand.Pointing.Name;
                            RightTex = HSet.RightHand.Idle.TexName;
                            break;
                    }

                    LeftApr = FSO.Content.Content.Get().AvatarAppearances.Get(LeftID);
                    RightApr = FSO.Content.Content.Get().AvatarAppearances.Get(RightID);
                }
                else
                {
                    FSO.Common.Content.ContentID LeftID = null;
                    FSO.Common.Content.ContentID RightID = null;

                    switch (m_LeftHandGesture)
                    {
                        case SimHandGesture.Idle:
                            LeftID = HSet.LeftHand.Idle.ID;
                            break;
                        case SimHandGesture.Fist:
                            LeftID = HSet.LeftHand.Fist.ID;
                            break;
                        case SimHandGesture.Pointing:
                            LeftID = HSet.LeftHand.Pointing.ID;
                            break;
                    }

                    switch (m_RightHandGesture)
                    {
                        case SimHandGesture.Idle:
                            RightID = HSet.RightHand.Idle.ID;
                            break;
                        case SimHandGesture.Fist:
                            RightID = HSet.RightHand.Fist.ID;
                            break;
                        case SimHandGesture.Pointing:
                            RightID = HSet.RightHand.Pointing.ID;
                            break;
                    }

                    LeftApr = FSO.Content.Content.Get().AvatarAppearances.Get(LeftID);
                    RightApr = FSO.Content.Content.Get().AvatarAppearances.Get(RightID);
                }

                if (LeftApr != null)
                    m_LeftHandInstance = base.AddAppearance(LeftApr, LeftTex);
                if (RightApr != null)
                    m_RightHandInstance = base.AddAppearance(RightApr, RightTex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Reloads the hand meshes.
        /// </summary>
        private void ReloadHandgroup()
        {
            if (m_LeftHandInstance != null)
            {
                base.RemoveAppearance(m_LeftHandInstance, true);
            }
            if (m_RightHandInstance != null)
            {
                base.RemoveAppearance(m_RightHandInstance, true);
            }

            if (m_Handgroup != null)
            {
                var HandgroupID = m_Handgroup.GetHandgroup();
                if (HandgroupID.FileID == 0)
                {
                    HandgroupID.FileID = (int)(158913789970 >> 32);
                }
                var Handgroup = FSO.Content.Content.Get().AvatarHandgroups.Get(HandgroupID.TypeID, HandgroupID.FileID);

                FSO.Common.Content.ContentID LeftID  = null;
                FSO.Common.Content.ContentID RightID = null;

                FSO.Vitaboy.HandSet HSet = null;

                switch (m_Appearance)
                {
                case AppearanceType.Light:
                    HSet = Handgroup.LightSkin;
                    break;

                case AppearanceType.Medium:
                    HSet = Handgroup.MediumSkin;
                    break;

                case AppearanceType.Dark:
                    HSet = Handgroup.DarkSkin;
                    break;
                }

                switch (m_LeftHandGesture)
                {
                case SimHandGesture.Idle:
                    LeftID = HSet.LeftHand.Idle.ID;
                    break;

                case SimHandGesture.Fist:
                    LeftID = HSet.LeftHand.Fist.ID;
                    break;

                case SimHandGesture.Pointing:
                    LeftID = HSet.LeftHand.Pointing.ID;
                    break;
                }

                switch (m_RightHandGesture)
                {
                case SimHandGesture.Idle:
                    RightID = HSet.RightHand.Idle.ID;
                    break;

                case SimHandGesture.Fist:
                    RightID = HSet.RightHand.Fist.ID;
                    break;

                case SimHandGesture.Pointing:
                    RightID = HSet.RightHand.Pointing.ID;
                    break;
                }

                Appearance LeftApr  = FSO.Content.Content.Get().AvatarAppearances.Get(LeftID);
                Appearance RightApr = FSO.Content.Content.Get().AvatarAppearances.Get(RightID);

                if (LeftApr != null)
                {
                    m_LeftHandInstance = base.AddAppearance(LeftApr);
                }
                if (RightApr != null)
                {
                    m_RightHandInstance = base.AddAppearance(RightApr);
                }
            }
        }