private void RefreshWeaponAppearance(EWeaponSlotType slot = EWeaponSlotType.Pointer)
        {
            if (slot == EWeaponSlotType.Pointer)
            {
                slot = HeldSlotType;
            }
            var weaponAgent = GetWeaponAgent(slot);

            if (weaponAgent.IsValid())
            {
                WeaponPartsRefreshStruct refreshParams = new WeaponPartsRefreshStruct();
                refreshParams.slot       = slot;
                refreshParams.weaponInfo = weaponAgent.ComponentScan;
                // refreshParams.oldParts = new WeaponPartsStruct();
                refreshParams.newParts     = weaponAgent.PartsScan;
                refreshParams.armInPackage = true;
                RefreshWeaponModelAndParts(refreshParams);
            }
            else
            {
                //不移除C4 RelatedAppearence.RemoveC4();
                WeaponInPackage pos = slot.ToWeaponInPackage();
                RelatedAppearence.UnmountWeaponInPackage(pos);
                InteractController.InterruptCharactor();
            }
        }
예제 #2
0
        private void DoDrawEmptyWeaponInPackage(EWeaponSlotType slotType, bool interrupt)
        {
            WeaponInPackage pos = slotType.ToWeaponInPackage();

            RelatedAppearence.UnmountWeaponInPackage(pos);
            if (interrupt)
            {
                InteractController.InterruptCharactor();
            }
        }