From bc48ca03a650f1c628d8bf96053c372f5478357c Mon Sep 17 00:00:00 2001 From: AlexCube Date: Tue, 13 Oct 2026 16:11:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D1=83=D0=BA=D0=B8=20=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=B8=D0=BC=D0=BE=D0=B3=D0=BE:=20=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D1=82=D1=8B=D0=B5=20=D1=80=D1=83=D0=BA=D0=B8=20=D0=B8=20?= =?UTF-8?q?=D1=81=D0=B4=D0=B2=D0=B8=D0=B3=20=D0=BF=D0=BE=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=B1=D0=BE=D1=80=D1=83=20=D0=B2=20=D0=B8=D0=B3=D1=80?= =?UTF-8?q?=D0=B5,=20=D1=81=D0=B5=D1=80=D0=B0=D1=8F=20=D0=BA=D0=BE=D0=B6?= =?UTF-8?q?=D0=B0=20=D0=B1=D0=B5=D0=B7=20=D1=82=D0=B5=D0=BA=D1=81=D1=82?= =?UTF-8?q?=D1=83=D1=80=D1=8B;=20=D0=BF=D0=BE=D1=8F=D1=81=20=D1=81=D0=BA?= =?UTF-8?q?=D1=80=D1=8B=D1=82=20=D0=BE=D1=82=20=D0=BF=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BB=D0=B8=D1=86=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Аниматор: IsAlive, IsFPV, WeaponHoldType 0 (FP_Unarmed_Hold) по умолчанию; сдвиг 0,-1.55,0.05. - Кожа: _Albedo убран, _Tint 0.6 серый (necroarms albedo on|off - сравнить). - Пояс персонажа скрыт в одержимости от первого лица. Co-Authored-By: Claude Opus 5.5 --- HarmonySrc/FpArms.cs | 25 +++++++++++++++++++++---- HarmonySrc/Possession.cs | 2 ++ HarmonySrc/SnakeControl.cs | 5 +++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/HarmonySrc/FpArms.cs b/HarmonySrc/FpArms.cs index c30318d..d70788e 100644 --- a/HarmonySrc/FpArms.cs +++ b/HarmonySrc/FpArms.cs @@ -33,12 +33,20 @@ namespace NecromancerTome "zombieUtilityWorker", "zombieYo", }; - public static Color Tint = new Color(0.55f, 0.56f, 0.55f, 1f); + public static Color Tint = new Color(0.6f, 0.6f, 0.6f, 1f); + /// Цветная текстура кожи (_Albedo): false - убрана, кожа ровно-серая по _Tint, рельеф - от карты нормалей + /// (указание 13.10: «руки вообще серые»; _Tint только умножает, смуглая кожа от него темнела, а не серела). + public static bool Albedo; /// Параметры аниматора рук, выставленные necroarms set (подбор «пустых рук»), - ставятся и при пересборке. - static readonly Dictionary _animParams = new Dictionary(); + static readonly Dictionary _animParams = new Dictionary + { + // Подобрано в игре 13.10: без них аниматор стоял в позе «держит мешок» (WeaponHoldType 45). 0 - пустые руки + // (HoldType у meleeHandPlayer), клип FP_Unarmed_Hold. + { "IsAlive", 1f }, { "IsFPV", 1f }, { "WeaponHoldType", 0f }, + }; /// Сдвиг рук от камеры (подбор necroarms pos). У персонажа игра опускает руки на 1.7 м: начало их /// скелета - у ног (vp_FPWeapon PositionOffset 0,-1.7,0.02 для SDCS). - public static Vector3 Offset = new Vector3(0f, -1.7f, 0.02f); + public static Vector3 Offset = new Vector3(0f, -1.55f, 0.05f); // подобрано в игре 13.10 (у персонажа -1.7, но руки рисуются с FOV 45) /// Родитель: true - сама камера, false - её UFPSRoot (как у персонажа). public static bool ParentCamera = true; @@ -154,6 +162,10 @@ namespace NecromancerTome if (m != null && m.HasColor("_Tint")) { m.SetColor("_Tint", Tint); + if (!Albedo && m.HasProperty("_Albedo")) + { + m.SetTexture("_Albedo", null); + } tinted++; } } @@ -356,7 +368,7 @@ namespace NecromancerTome public class ConsoleCmdNecroArms : ConsoleCmdAbstract { public override string[] getCommands() => new[] { "necroarms" }; - public override string getDescription() => "NecromancerTome: руки одержимого от первого лица - [pos x y z | parent cam|ufps | anim | mat | set | trigger | tint r g b]"; + public override string getDescription() => "NecromancerTome: руки одержимого от первого лица - [pos x y z | parent cam|ufps | anim | mat | set | trigger | tint r g b | albedo on|off]"; void Out(string _s) { @@ -380,6 +392,11 @@ namespace NecromancerTome FpArms.ParentCamera = _params[1] != "ufps"; FpArms.Rebuild(); } + else if (cmd == "albedo" && _params.Count >= 2) + { + FpArms.Albedo = _params[1] == "on"; + FpArms.Rebuild(); + } else if (cmd == "anim") { Out(FpArms.DumpAnim()); diff --git a/HarmonySrc/Possession.cs b/HarmonySrc/Possession.cs index fa9a598..9459643 100644 --- a/HarmonySrc/Possession.cs +++ b/HarmonySrc/Possession.cs @@ -592,6 +592,8 @@ namespace NecromancerTome if (FirstPerson) { FpArms.Show(_player, z); + // Пояс персонажа в виде от первого лица скрыт (13.10); обратно игра откроет его сама (OnHUD). + _player.PlayerUI?.windowManager.Close(SnakeControl.ToolbeltWindow); } else { diff --git a/HarmonySrc/SnakeControl.cs b/HarmonySrc/SnakeControl.cs index f4c922a..f7d245b 100644 --- a/HarmonySrc/SnakeControl.cs +++ b/HarmonySrc/SnakeControl.cs @@ -1320,7 +1320,8 @@ namespace NecromancerTome } /// Пояс в режиме змеи скрыт (указание 28.09: «прятать оверлей с поясом»), так же в - /// чертогах и у одержимого питомца (06.10). Игра каждый + /// чертогах, у одержимого питомца (06.10) и у одержимого от первого лица (13.10: «пояс игрока нужно прятать + /// в одержимости от первого лица»; потом у зомби будут свои пояса). Игра каждый /// кадр в EntityPlayerLocal.OnHUD открывает окно "toolbelt", если оно закрыто, - поэтому не /// закрываем его раз за разом, а не даём открыться: все Open сходятся в openInternal. [HarmonyPatch(typeof(GUIWindowManager), "openInternal")] @@ -1328,7 +1329,7 @@ namespace NecromancerTome { public static bool Prefix(GUIWindow _w) { - return !((SnakeControl.Controlling || MindControl.Controlling || (Possession.Active && Possession.IsPet)) && _w != null && _w.Id == SnakeControl.ToolbeltWindow); + return !((SnakeControl.Controlling || MindControl.Controlling || (Possession.Active && (Possession.IsPet || Possession.FirstPerson))) && _w != null && _w.Id == SnakeControl.ToolbeltWindow); } }