diff --git a/HarmonySrc/FpArms.cs b/HarmonySrc/FpArms.cs index 704a06b..b339884 100644 --- a/HarmonySrc/FpArms.cs +++ b/HarmonySrc/FpArms.cs @@ -108,8 +108,26 @@ namespace NecromancerTome SDCSUtils.tmpAssetsOwner = wasOwner; } _rig.transform.SetLocalPositionAndRotation(Offset, Quaternion.identity); + // Скрипты префаба (vp_FPWeapon, риг IK и др.) рассчитаны на руки персонажа: включённая копия с ними повесила + // игру (тест 13.10: «прожал ~ и всё зависло», лог - vp_FPWeapon «Could not find CharacterController»). + // Рукам хватает скелета, аниматора и сетки - скрипты снимаем до включения. + // С конца и в два прохода: скрипт, от которого зависит другой ([RequireComponent]), снимется вторым. + int stripped = 0; + for (int pass = 0; pass < 2; pass++) + { + MonoBehaviour[] mbs = _rig.GetComponentsInChildren(true); + for (int i = mbs.Length - 1; i >= 0; i--) + { + if (mbs[i] != null) + { + Object.DestroyImmediate(mbs[i]); + stripped++; + } + } + } // Префаб рук выключен: у персонажа его включает BodyAnimator (State = Visible) - тест 13.10: «активны False». _rig.SetActive(true); + Debug.Log("[NecromancerTome] FpArms: снято скриптов " + stripped); _rig.name = "necroZombieArmsFP"; int layer = LayerMask.NameToLayer("HoldingItem"); int tinted = 0; diff --git a/NecromancerHarmony.dll b/NecromancerHarmony.dll index c9c005d..9f7d796 100644 Binary files a/NecromancerHarmony.dll and b/NecromancerHarmony.dll differ diff --git a/NecromancerHarmony.pdb b/NecromancerHarmony.pdb index 51560fd..54ec4d3 100644 Binary files a/NecromancerHarmony.pdb and b/NecromancerHarmony.pdb differ