Руки одержимого: пустые руки и сдвиг по подбору в игре, серая кожа без текстуры; пояс скрыт от первого лица

- Аниматор: 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 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-13 16:11:49 +03:00
co-authored by Claude Opus 5.5
parent eec92da08a
commit bc48ca03a6
3 changed files with 26 additions and 6 deletions
+21 -4
View File
@@ -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);
/// <summary>Цветная текстура кожи (_Albedo): false - убрана, кожа ровно-серая по _Tint, рельеф - от карты нормалей
/// (указание 13.10: «руки вообще серые»; _Tint только умножает, смуглая кожа от него темнела, а не серела).</summary>
public static bool Albedo;
/// <summary>Параметры аниматора рук, выставленные necroarms set (подбор «пустых рук»), - ставятся и при пересборке.</summary>
static readonly Dictionary<string, float> _animParams = new Dictionary<string, float>();
static readonly Dictionary<string, float> _animParams = new Dictionary<string, float>
{
// Подобрано в игре 13.10: без них аниматор стоял в позе «держит мешок» (WeaponHoldType 45). 0 - пустые руки
// (HoldType у meleeHandPlayer), клип FP_Unarmed_Hold.
{ "IsAlive", 1f }, { "IsFPV", 1f }, { "WeaponHoldType", 0f },
};
/// <summary>Сдвиг рук от камеры (подбор necroarms pos). У персонажа игра опускает руки на 1.7 м: начало их
/// скелета - у ног (vp_FPWeapon PositionOffset 0,-1.7,0.02 для SDCS).</summary>
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)
/// <summary>Родитель: true - сама камера, false - её UFPSRoot (как у персонажа).</summary>
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 <param> <value> | trigger <name> | tint r g b]";
public override string getDescription() => "NecromancerTome: руки одержимого от первого лица - [pos x y z | parent cam|ufps | anim | mat | set <param> <value> | trigger <name> | 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());
+2
View File
@@ -592,6 +592,8 @@ namespace NecromancerTome
if (FirstPerson)
{
FpArms.Show(_player, z);
// Пояс персонажа в виде от первого лица скрыт (13.10); обратно игра откроет его сама (OnHUD).
_player.PlayerUI?.windowManager.Close(SnakeControl.ToolbeltWindow);
}
else
{
+3 -2
View File
@@ -1320,7 +1320,8 @@ namespace NecromancerTome
}
/// <summary>Пояс в режиме змеи скрыт (указание 28.09: «прятать оверлей с поясом»), так же в
/// чертогах и у одержимого питомца (06.10). Игра каждый
/// чертогах, у одержимого питомца (06.10) и у одержимого от первого лица (13.10: «пояс игрока нужно прятать
/// в одержимости от первого лица»; потом у зомби будут свои пояса). Игра каждый
/// кадр в EntityPlayerLocal.OnHUD открывает окно "toolbelt", если оно закрыто, - поэтому не
/// закрываем его раз за разом, а не даём открыться: все Open сходятся в openInternal.</summary>
[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);
}
}